[rt-users] OnCreate NotifyAdminCcs
Gene LeDuc
gleduc at mail.sdsu.edu
Fri Mar 14 11:28:57 EDT 2008
Hi Mathew,
Since you already have a scrip that has conditions that determine whether
or not to assign an owner when the ticket is created, I'd just copy those
conditions into another scrip and negate them to determine whether to send
the e-mail notification. Timing in RT scrip execution can get tricky when
one scrip is relying on another scrip having made a change. Using the same
conditions for your notification scrip doesn't rely on the owner having
actually been changed yet. Rather than using OnCreate, though, you need to
use User-Defined for the condition.
Regards,
Gene
At 06:28 PM 3/13/2008, mathew_ericson at agilent.com wrote:
>I was wondering if you could help me I am trying to develop a Scrip
>custom condition that will prevent notification if a Owner: <owner>
>field has been emailed in ticket creation. We are using RT to generate
>tickets via email and in some cases we assign the owner on submission
>the entire team that is watching the queue does not need to receive
>email about tickets that already have an owner.
>
>OnCreateNotifyAdminCc
>Condition: OnCreate
>Action: Notify AdminCcs
>Template: Global template: Transaction
>Stage: TransactionCreate
>
>Custom condition:
>my $transactionType = $self->TransactionObj->Type;
>my $ticketOwner = $self->TicketObj->Owner;
>
>if ($transactionType eq 'Create') {
> return 1 if ($ticketOwner()->Id() != $RT::Nobody()->Id());
>}
>return 0;
>
>Ultimately we only want to continue executing the script if the owner is
>NOT Nobody.
>
>Regards Mathew
>
>Mathew Ericson
>IT Specialist (Systems Design)
>Agilent Technologies, Inc.
>+613 9210-5956 Tel
--
Gene LeDuc, GSEC
Security Analyst
San Diego State University
More information about the rt-users
mailing list