[rt-users] On Correspond/Comment Notify Owner?

Gary Oberbrunner garyo at genarts.com
Thu Jul 12 17:45:19 EDT 2007


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



More information about the rt-users mailing list