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. _______________________________________________ http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users Community help: http://wiki.bestpractical.com Commercial support: sa...@bestpractical.com 2010 RT Training Sessions! San Francisco, CA, USA - Feb 22 & 23 Dublin, Ireland - Mar 15 & 16 Boston, MA, USA - April 5 & 6 Washington DC, USA - Oct 25 & 26 Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com