[rt-users] Scrip condition met but not acted on

Mathew Snyder theillien at yahoo.com
Mon Sep 24 15:04:56 EDT 2007


I've figured out the problem.  The Custom condition that checks if a transaction
is for CustomFields, is on the one CF and that the value is being set to
Provisioning doesn't run during a ticket Create action.  If I set the value of
that CF to Provisioning *after* the ticket has been created, the child tickets
I'm trying to spawn are created.  I'm wondering if using TransactionBatch will
fix this.

Keep up with me and what I'm up to: http://theillien.blogspot.com


Gene LeDuc wrote:
> 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
> 
> 



More information about the rt-users mailing list