[rt-users] Triggering scrips on add/delete Ccs

Tim Wilson twilson at buffalo.k12.mn.us
Thu Oct 18 23:05:08 EDT 2007


Hey everyone,

For the sake of completeness and mailing list documentation, here's the snippet of code I'm using in my template to send an email to each new CC alerting them that they've been added to the ticket. The same code would work any time a new watcher is added to a ticket. If you use OldValue instead, I think it would also work for notifying watchers that they've been removed from a ticket.

To: {
my $watcherid = $Transaction->NewValue;
my $user = RT::User->new( $RT::SystemUser );
$user->Load( $watcherid );
$user->EmailAddress;
}
Subject: New RFC: {$Ticket->Subject}

The $watcherid value is the user id of the person added as CC. Thanks to everyone who responded to my original question.

-Tim


-- 
Tim Wilson, Director of Technology
Buffalo-Hanover-Montrose Schools
214 1st Ave NE   Buffalo, MN  55313
ph: 763.682.8740  fax: 763.682.8743  http://www.buffalo.k12.mn.us








More information about the rt-users mailing list