[rt-users] Scrip to create multiple child tickets
Jonathan Rummel
jrummel at imapp.com
Tue Mar 2 11:18:45 EST 2010
Hi everyone,
I have a Select Multiple custom field called 'Client'. I want my scrip to
create a child ticket for each client selected. So far, my scrip works, but
only creates 1 child ticket, no matter how many clients are selected. Here
is my current scrip:
RT 3.6.5
Description: Create multiple child tix
Condition: User Defined
Action: Create Tickets
Template: Custom Template: Create multiple child tickets
Stage: Transaction Create
Custom condition:
if ($self->TransactionObj->Type ne 'Create' &&
$self->TicketObj->FirstCustomFieldValue('Client') eq 'client1) {
return 1;
}
if ($self->TransactionObj->Type ne 'Create' &&
$self->TicketObj->FirstCustomFieldValue('Client') eq 'client2') {
return 1;
}
return 0;
Here is the Template code:
===Create-Ticket: client
Subject: {$Tickets{'TOP'}->Subject}
({$Tickets{'TOP'}->FirstCustomFieldValue('Client')})
Depended-On-By: {$Tickets{'TOP'}->Id()}
Owner: testuser
Queue: Client Issues
Content: This ticket has been auto-created.
ENDOFCONTENT
Is there anyone that can help me identify why only 1 child ticket is being
created, and not multiple? I obviously have limited skills here, so any
help would be greatly appreciated! Please please help!
Thanks so much!
Jonathan
--
View this message in context: http://old.nabble.com/Scrip-to-create-multiple-child-tickets-tp27714242p27714242.html
Sent from the Request Tracker - User mailing list archive at Nabble.com.
More information about the rt-users
mailing list