Gene LeDuc wrote:
> Hi Gary,
> 
> So what you want is for the owner of the ticket to be notified of _all_
> transactions where the owner is not the creator of the transaction?
> 
> A scrip condition like this might do it:
> { my $Transaction = $self->TransactionObj;
>   my $Creator = $Transaction->CreatorObj->Id;
>   my $Ticket = $self->TicketObj;
>   my $Owner = $Ticket->Owner;
>   return $Creator != $Owner && $Owner > 12;
> }
> 
> The "$Owner > 12" condition prevents the scrip from firing if the ticket
> owner is Nobody, SystemUser, or RT's Root (at least on my 3.6.3 system).

Awesome, thanks!  (root is 12 on my 3.6.4 also.)  I notice there's no mention
of CreatorObj in the RT::Transaction section of the POD... maybe because it
inherits from RT::Record I guess.  Much to learn.

-- 
Gary
_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com

Reply via email to