[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
creation.


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,

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


More information about the rt-users mailing list