[rt-users] Make scrip run once per ticket, and only once

IT Guy zachary.neubert at usu.edu
Thu May 22 12:52:04 EDT 2014


I have a scrip that emails custom field values to a junk email address so
that the values show up in transactions. This is necessary for various
reasons I won't bother you with here.

However, the current conditions I have allow the scrip to run several times
per ticket. How can I stop this?

This is the custom condition I wrote:

my $Ticket = $self->TicketObj;
return 0 unless $self->TransactionObj->Type eq 'CustomField';
return 0 unless $Ticket->FirstCustomFieldValue('Keywords');
return 1;

Because there are several custom fields being emailed, with each one
activating all the custom field scrips, this scrip is executed many times
per ticket.



--
View this message in context: http://requesttracker.8502.n7.nabble.com/Make-scrip-run-once-per-ticket-and-only-once-tp57454.html
Sent from the Request Tracker - User mailing list archive at Nabble.com.



More information about the rt-users mailing list