Jonathan,<br><br>Try something like this:<br><br>Condition: User Defined<br>
Action: Create Tickets<br>
Template: Create Child Ticket<br>
Stage: TransactionBatch<br><br><br>Custom Condition:<br><br>my $trans = $self->TransactionObj;<br>my $ticket = $self->TicketObj;<br><br>if ($trans->Type eq 'CustomField')<br> {my $cf = new RT::CustomField($RT::SystemUser);<br>
$cf->LoadByName(Queue => $ticket->QueueObj->id,<br> Name => "YOUR CF");<br> return 0 unless $cf->id; <br> if ($trans->Field == $cf->id &&<br> $trans->NewValue eq "Florida")<br>
{<br> return 1;<br> }<br> }<br><br>return 0;<br><br>That should create the ticket. I think you will need a different scrip for notification purposes. One notification scrip should suffice for all the tickets created.<br>
<br>Be sure to use TransactionBatch.<br><br>Hope this helps.<br><br>Kenn<br>LBNL<br><br><div class="gmail_quote">On Wed, Jun 9, 2010 at 10:41 AM, Jonathan Rummel <span dir="ltr"><<a href="mailto:jrummel@imapp.com">jrummel@imapp.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><br>
That's correct, Kenn. If they select 3 values, I want 3 child tickets and so<br>
on. However, that's my main problem. I've done what you're suggesting (by<br>
using the code I provided, with one scrip for each state), and it only<br>
creates a child ticket for the first option selected. Any ideas?<br>
<br>
Jonathan<br>
<div><div></div><div class="h5"><br>
<br>
<br>
Kenneth Crocker wrote:<br>
><br>
> Jonathan,<br>
><br>
> If I understand this right, you want to create a child ticket for every<br>
> value the user selects in the Custom Field. If they choose Florida and<br>
> Maine, then you want two child tickets. If they select Florida, you want<br>
> one. What if they select 3 or 4 values? If this is the case, I would<br>
> create<br>
> a scrip for each possible value, that way, no matter how many they select,<br>
> each one will create a child ticket.<br>
><br>
> Kenn<br>
> LBNL<br>
><br>
> On Wed, Jun 9, 2010 at 9:10 AM, Jonathan Rummel <<a href="mailto:jrummel@imapp.com">jrummel@imapp.com</a>> wrote:<br>
><br>
>><br>
>> Thanks, Kevin. I'm pretty much doing this on a novice level, and could<br>
>> use<br>
>> a<br>
>> little more explaining if possible. Please see notes in caps and<br>
>> parenthesis below:<br>
>><br>
>> Jonathan<br>
>><br>
>> Your condition only checks if the first value is Florida and then<br>
>> again hardcodes the first value into the ticket creation. Using<br>
>> FirstCustomFieldValue is never going to show you the second value.<br>
>><br>
>> (HOW DO I REFERENCE THE 2ND, 3RD, ETC. CUSTOM FIELD VALUES IN MY<br>
>> CONDITION?<br>
>> I DON'T SUPPOSE IT'S AS EASY AS "SecondCustomFieldValue".)<br>
>><br>
>> CreateTickets can create multiple tickets by defining them in the<br>
>> Template with differing ===Create-Ticket: lines (see the pod in the<br>
>> action) but that requires you to know how many tickets you want.<br>
>><br>
>> (COULD YOU PLEASE EXPLAIN THE ABOVE FURTHER? I'M NOT SURE I COMPLETELY<br>
>> UNDERSTAND.)<br>
>><br>
>> I believe in the past people have advised that you either write a look<br>
>> that calls Ticket->Create for each CustomFieldValue, but you should be<br>
>> able to generate the template entirely within {} for each<br>
>> CustomFieldValue if you want to go that route.<br>
>><br>
>> -kevin<br>
>><br>
>> --<br>
>> View this message in context:<br>
>> <a href="http://old.nabble.com/Spawn-multiple-child-tickets-tp28755908p28832522.html" target="_blank">http://old.nabble.com/Spawn-multiple-child-tickets-tp28755908p28832522.html</a><br>
>> Sent from the Request Tracker - User mailing list archive at Nabble.com.<br>
>><br>
>><br>
>> Discover RT's hidden secrets with RT Essentials from O'Reilly Media.<br>
>> Buy a copy at <a href="http://rtbook.bestpractical.com" target="_blank">http://rtbook.bestpractical.com</a><br>
>><br>
><br>
><br>
> Discover RT's hidden secrets with RT Essentials from O'Reilly Media.<br>
> Buy a copy at <a href="http://rtbook.bestpractical.com" target="_blank">http://rtbook.bestpractical.com</a><br>
><br>
<br>
</div></div><font color="#888888">--<br>
View this message in context: <a href="http://old.nabble.com/Spawn-multiple-child-tickets-tp28755908p28833645.html" target="_blank">http://old.nabble.com/Spawn-multiple-child-tickets-tp28755908p28833645.html</a><br>
</font><div><div></div><div class="h5">Sent from the Request Tracker - User mailing list archive at Nabble.com.<br>
<br>
<br>
Discover RT's hidden secrets with RT Essentials from O'Reilly Media.<br>
Buy a copy at <a href="http://rtbook.bestpractical.com" target="_blank">http://rtbook.bestpractical.com</a><br>
</div></div></blockquote></div><br>