Jeff,<br><br>OK. Here's what you do:<br><br>Create a Template called "Notify Parents on Resolve".<br><br>The Template should have code similar to this (loop thru all parents and add the Emailaddress of the ticket owner to the "To:" line in the Template) at the top (test the code to correct my mistakes):<br>
<br>To: {my $parent = $Ticket->MemberOf;);<br>      my $OUTPUT;<br>      while ( my $value = $parent->Next )<br>        {<br>         $OUTPUT .= $value->OwnerObj->EmailAddress;<br>         $OUTPUT .= "<---\n";<br>
        }<br>     $OUTPUT;<br>     }<br>Subject: This Child Ticket has been Resolved<br><br>Then create a scrip titled "Notify Parents of Resolved Child".<br><br>The code should be like this:<br><br># Condition:   User Defined<br>
# Action:      Notify Others ("To:" address built by template code in template below)<br># Template:    Global template: Notify Parents of Resolved Child<br># Stage:       TransactionBatch<br><br>#----------------------------------------------------------------------------<br>
# Custom condition:<br>#----------------------------------------------------------------------------<br># Set initial values<br><br>my $trans = $self->TransactionObj;<br>my $ticket = $self->TicketObj;<br>my $MemberOf = $ticket->MemberOf;<br>
<br>#<br># Check for value change on Ticket Status<br>#<br><br>return ($self->TransactionObj->Type eq "Status" &&<br>          $self->TransactionObj->NewValue eq "resolved" &&<br>
          $MemberOf);<br><br><br>#----------------------------------------------------------------------------<br># Custom action preparation code: None<br>#----------------------------------------------------------------------------<br>
<br><br>#----------------------------------------------------------------------------<br># Custom action clean-up code: None<br>#----------------------------------------------------------------------------<br><br>Anyway, I just whipped this up and you should verify all the code. The thing is you want to set a condition that tests that the ticket is being resolved and it is a child. The template should have code that replaces the "To:" address with the email address of the owner for any parent above and that way all parents, grandparents, etc get an email saying that a child ticket has been resolved. My code may be off but the mechanics should be correct.<br>
<br>Hope this helps.<br><br>Kenn<br><br><div class="gmail_quote">On Tue, Jun 5, 2012 at 2:48 PM, Jeff Blaine <span dir="ltr"><<a href="mailto:jblaine@kickflop.net" target="_blank">jblaine@kickflop.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 6/5/2012 5:29 PM, Thomas Sibley wrote:<br>
<br>
Thanks Thomas<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Think about it this way.  Make your Condition custom "On Resolve + Has<br>
Parents"<br>
</blockquote>
<br></div>
Right.<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Then use a standard Notify* action and set the Template on the scrip.<br>
</blockquote>
<br></div>
The goal is: On resolve of a child ticket, notify *each parent<br>
tickets' owner* that the child was resolved.<br>
<br>
There is no "standard Notify* action" for "Owners of parent<br>
tickets", so I'm confused by what you mean there.<br>
<br>
You also said "the Template". Are you suggesting that I write<br>
the logic into a new custom template and force the "To:"<br>
field there?  Or did you intend "the Template" to mean any<br>
existing template of my choice.<br>
<br>
I really don't follow you due to terseness, though I am certainly<br>
not looking for anyone to provide the code either.<br>
</blockquote></div><br>