Custom field condition

Hi All: Using RT 3.4.5 I have a custom field for Severity of the issues submitted, and I want to have a cell phone paged in the event of a ticket being created with a Severity of Critical. Under Configuration->Global->Scrips, I have a scrip with the following attributes; Description: Page Support Condition: On Create Action: Notify Other Recipients Template: Global template: Page Cellphone Stage: Transaction Create My custom condition is; if ($self->TicketObj->FirstCustomFieldValue(‘Severity’) eq “Critical”) { return(1);} else { return(undef);} Every newly created ticket fires off the scrip regardless of what value my custom field contains. Can anyone see whatI am doing wrong? Thanks in advance! Bill Chever Product Support Manager Terracotta, Inc. +1.510.915.2425

Found it! I was using On Create and should have been using User Defined so the system would actually use the scrip. Doh! Thanks anyway! Bill

Bill,

You should also use “return;” instead of “return (undef);”
because the later will evaluate to true if the scrip
condition were to be called in a list context. See
Perl Best Practices for more info.

-ToddOn Mon, Jun 12, 2006 at 03:57:45PM -0700, Bill Chever wrote:

Found it! I was using On Create and should have been using User Defined so the system would actually use the scrip. Doh! Thanks anyway! Bill


The rt-users Archives

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

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

We’re hiring! Come hack Perl for Best Practical: Careers — Best Practical Solutions

Todd,

Cool!, and gotcha. Thanks for the quick reply, Dude. (you know, I’m working
in California.)

-BillFrom: Todd Chapman [mailto:todd@chaka.net]
Sent: Monday, June 12, 2006 8:01 PM
To: Bill Chever
Cc: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] RE: custom field condition

Bill,

You should also use “return;” instead of “return (undef);”
because the later will evaluate to true if the scrip condition were to be
called in a list context. See Perl Best Practices for more info.

-Todd