[rt-users] Scrip to clean Cc in a ticket

Coil Sky coil.key.92 at gmail.com
Thu Mar 17 12:23:44 EDT 2016

Dear RT users,

We have a RT queue that receive new ticket by email sending and with a lot
of junked Cc adresses
I need your help to write a script that delete all Cc addresses on ticket

I started thinking about it and did some tests with the following :

Condition: OnCreate
Action: User Defined

Custom condition: return 1;

Custom action preparation code:

use RT::Ticket;
my $ticket = RT::Ticket->new($CurrentUser);
my $CcList = $ticket->CcAddresses ;

$self->TicketObj->DeleteWatcher(Type=>"Cc",Email=> "$CcList");

Custom action cleanup code:  return 1;

If someone has an idea to do it, it would really great

Thanks in advance,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20160317/7b6b96ad/attachment.html>

More information about the rt-users mailing list