[rt-users] Scrip condition met but not acted on
Gene LeDuc
gleduc at mail.sdsu.edu
Mon Sep 24 14:45:07 EDT 2007
Hi Matt,
Disclaimer: I use 3.6.3, so things might have changed with 3.6.4
Since you are using Custom action prep code, I assume your Action is set to
User Defined. If this is the case, your Prep action won't trigger anything
because there's nothing in your Cleanup code.
If your Action is set to something other than User Defined, the Custom prep
and cleanup sections are ignored.
Gene
At 10:52 AM 9/24/2007, Mathew Snyder wrote:
>Using 3.6.4, I'm trying to create child tickets if the value of a CF called
>"Ticket Type" is set to "Provisioning". However, I can't seem to work out the
>logic for the Custom condition. This is what I have:
>
>if (($self->TransactionObj->Type eq "CustomField" &&
>$self->TransactionObj->Field == 5 && )){
>return 1;
>} else {
>return 0;
>}
>
>With the Custom action preparation code being:
>return 0 unless $self->TicketObj->FirstCustomFieldValue('Ticket
>Type') =~ /Provisioning/i;
>
>The Custom action cleanup code is empty.
>
>
>I've changed it to include the FirstCustomFieldValue check as part of the
>condition and the prep code set to "return 1;" but that didn't help. The only
>time I can get the child tickets to spawn is if I add "||
>$self->TickeObj->Type
>eq "Create" "
>
>I'm guessing I've go the logic wrong. Can someone help me out with this?
>
>Mathew
>--
>Keep up with me and what I'm up to: http://theillien.blogspot.com
>_______________________________________________
>http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>
>Community help: http://wiki.bestpractical.com
>Commercial support: sales at bestpractical.com
>
>
>Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
>Buy a copy at http://rtbook.bestpractical.com
--
Gene LeDuc, GSEC
Security Analyst
San Diego State University
More information about the rt-users
mailing list