[rt-users] OnCreate (except if reminder)

Kevin Falcone falcone at bestpractical.com
Mon Apr 23 11:07:55 EDT 2012


On Mon, Apr 23, 2012 at 02:43:09PM +0100, Tony Atkinson wrote:
> Hello,
> I'm looking for help with a custom scrip
> 
> The scrip that notifies AdminCCs on create is also triggered by
> reminders - which I'm looking to stop
> 
> I found this, which is exactly what I'm wanting
> http://lists.bestpractical.com/pipermail/rt-users/2009-December/062565.html
> 
> > my $trans = $self->TransactionObj;
> > my $ticket = $self->TicketObj;
> > return 0 unless $trans->Type == 'Create';
> > return 0 unless $ticket->Type != 'reminder';
> > return 1;
> 
> But the custom code doesn't seem to work (completely disables AdminCC
> notifications)
> It was written in 2009, so I'm guessing something has changed in the API?
> 
> Can anyone point me to the right way of doing
> "On create, except for reminders, notify AdminCCs"

I'm amazed that code ever worked, it's doing numerical comparison of
strings (eq and ne vs == and !=).

You can read more about them in perldoc perlop, but a straight swap
should be enough, although I might phrase the second check
differently.

-kevin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20120423/3ca2d0e0/attachment.sig>


More information about the rt-users mailing list