OnWatcherChange: Difference between revisions
Jump to navigation
Jump to search
m (2 revisions imported) |
mNo edit summary |
||
Line 1: | Line 1: | ||
This simple scrip condition triggers when a Cc is added to a ticket. | This simple scrip condition triggers when a Cc is added to a ticket. | ||
<pre> | |||
my $transactionType = $self->TransactionObj->Type; | my $transactionType = $self->TransactionObj->Type; | ||
my $watcherType = $self->TransactionObj->Field; | my $watcherType = $self->TransactionObj->Field; | ||
Line 7: | Line 8: | ||
} | } | ||
return undef; | return undef; | ||
</pre> | |||
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 | 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]]". | To trigger on the removal of a watcher, change "[[AddWatcher]]" in line 3 to "[[DelWatcher]]". |
Latest revision as of 17:56, 13 August 2016
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".