OnWatcherChange

From Request Tracker Wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

This simple scrip condition triggers when a Cc is added to a ticket.

 my $transactionType = $self->TransactionObj->Type;
 my $watcherType = $self->TransactionObj->Field;
 if (($transactionType eq 'AddWatcher') and ($watcherType eq 'Cc')) {
   return 1;
 }
   return undef;

Just change "Cc" in line 3 to "AdminCc" to look for that change. Original version by Taan posted to rt-users at http://www.gossamer-threads.com/lists/rt/users/62335#62335

To trigger on the removal of a watcher, change "AddWatcher" in line 3 to "DelWatcher".