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

Kevin Comer kevin.comer at veracitypayments.com
Tue Feb 5 11:03:51 EST 2013


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.



More information about the rt-users mailing list