[rt-users] Scrip condition met but not acted on
Mathew Snyder
theillien at yahoo.com
Mon Sep 24 13:52:46 EDT 2007
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
More information about the rt-users
mailing list