[rt-users] Open Ticket On Resolve Of Dependants?

Kevin Falcone falcone at bestpractical.com
Thu Feb 7 10:26:00 EST 2013


On Wed, Feb 06, 2013 at 09:26:23AM -0500, Kevin Comer wrote:
> 
> Our Process:
> 1. Parent Ticket created, & Custom Fields Selected ->
> 2. scrip Creates multiple Approval tickets with Specific Subjects ->
> 3. When All Approvals are completed, Parent ticket is set to open via
> script ->
> 4. on Status change to Open of Parent ticket, -> a new Implementation
> ticket is created to a Queue based on Custom Field from Parent Ticket.
> 5. New Implementation ticket is then ready to be worked and Resolved.
> 6. Once All tickets are Resolved the Parent ticket can be Resolved
> 7. TBD (On Completion create a new Review ticket/s for Finial Approval)
> 
> The solution to open based on Subject would fire when a ticket with a
> Specific Subject line was resolved.
> 
> In our case this is an approval process and there will be several
> approvals, such as Manager, Security, Change Coordinator etc.
> If the scrip sets the parent ticket to open based on Subject, our
> process would be to resolve the Change Coordinator ticket last. The
> other Approval tickets could be approved anytime before the Change
> Coordinator. Once all approvals are completed the Implementation ticket
> is then ready to be worked.

Have you considered using RT's approvals?
http://bestpractical.com/rt/docs/latest/customizing/approvals.html
rather than building from scratch

-kevin

> On 02/06/2013 03:53 AM, Christian Loos wrote:
> >Hi Kevin,
> >
> >this scrip open the parent ticket if all dependent are closed:
> >
> >my $deps = $self->TicketObj->DependedOnBy;
> >while( my $link = $deps->Next ) {
> >     next unless $link->BaseURI->IsLocal;
> >     my $dep = $link->BaseObj;
> >     next if $dep->QueueObj->IsInactiveStatus($dep->Status);
> >     $dep->SetStatus('open') unless $dep->HasUnresolvedDependencies;
> >}
> >return 1;
> >
> >Note that you have to change your scrip condition to "On Close".
> >
> >I don't understand the part with the ticket subject. Maybe you can
> >figure it out by yourself with my suggestion or you can explain it a
> >little bit more what you want to do.
> >
> >Chris
> >
> >Am 05.02.2013 17:03, schrieb Kevin Comer:
> >>Hello,
> >>
> >>I am new to Perl and RT Scrips, and I need to set up a scrip that will
> >>change the parent ticket from new to open when all dependent tickets
> >>have been resolved, or have it perform only on the Subject of one
> >>Specific Ticket.
> >>
> >>I found this script below and it works on the first ticket resolved. How
> >>can I modify this scrip to either wait till all dependents are resolved
> >>or resolved on a specific subject?
> >>
> >>I have tried this to get it to work on the subject, but to no
> >>avail.      next unless( $l->BaseObj->Subject eq
> >>'Change-Coordinator-Approval');
> >>
> >>How can I find or figure out what objects are available for the
> >>different sections of a ticket? etc.
> >>
> >>Condition: On Status Change
> >>      Action: User Defined
> >>  Template: Global Template Blank
> >>
> >>Customer action: return 1;
> >>Custom action cleanup code:
> >>    return 1 if ($self->TransactionObj->NewValue !~
> >>/^(?:resolved|deleted|rejected)$/);
> >>    my $DepOnBy = $self->TicketObj->DependedOnBy;
> >>    while( my $l = $DepOnBy->Next ) {
> >>      next unless( $l->BaseURI->IsLocal );
> >>      next unless( $l->BaseObj->Status =~ /^(?:new|open|stalled)$/ );
> >>
> >>      # here you can add any action
> >>      # see also example below
> >>      $l->BaseObj->SetStatus('open');
> >>    }
> >>    $DepOnBy = undef;
> >>    return 1;
> >>
> >>Any thoughts or ideas?
> >>
> >>Thanks in advance
> >>
> >>The information transmitted in this email is intended only for the
> >>person or entity to which it is addressed and may contain confidential
> >>and/or privileged material.  Any review, retransmission, dissemination
> >>or other use of, or taking of any action in reliance upon this
> >>information by persons or entities other than the intended recipient is
> >>prohibited.  If you received this email in error, please contact the
> >>sender and delete the email from your computer.
> >>
> >>
> 
> 
> The information transmitted in this email is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material.  Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited.  If you received this email in error, please contact the sender and delete the email from your computer.
> 
> 
> -- 
> Help improve RT by taking our user survey: https://www.surveymonkey.com/s/N23JW9T
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 235 bytes
Desc: not available
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20130207/ed3d09d0/attachment.sig>


More information about the rt-users mailing list