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
pgpLfFKDJsSwo.pgp
Description: PGP signature
