[rt-users] Suppress Scrip If Actor is RT System Itself
Kevin Falcone
falcone at bestpractical.com
Mon Jan 7 17:52:05 EST 2013
On Mon, Jan 07, 2013 at 05:24:20PM -0500, Matt Brennan wrote:
> I tried added this to the beginning of my "On Create Autoreply To
> Requestors" scrip (condition was set to user defined):
Since you've made this User Defined, you'll need to handle the check
if it was a Create manually in your code also.
> return 0 if ( $self->TransactionObj->CreatorObj->PrincipalObj eq
> $RT::SystemUser );
This stringifies PrincipalObj and compares it to the stringification
of $RT::SystemUser which isn't going to work. You want to compare
both ->Id using numberic comparison (== not eq)
-kevin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 235 bytes
Desc: not available
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20130107/f0ece088/attachment.sig>
More information about the rt-users
mailing list