OnWatcherChange

From Request Tracker Wiki
Revision as of 16:15, 6 April 2016 by Admin (talk | contribs) (2 revisions imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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".