I am trying to create an approval process for ticket closure.
I know this may sound strange at first… The business reason behind this is an ISO-requirement when tracking quality management issues, e.g. a somebody has to approve the implemented measure(s) is/are working within the specified boundaries.
So far all my attempts end up in a approve == ticket goes back to open / deny ticket goes to reject status which are both not helpful. The required situation would be approve == status goes to close / reject == status goes/stays back at open.
Is there some way to achive this approval process?
if the approval is positive i want the parent ticket to be closed (or if easier to achieve stay closed), otherwise the parent should stay open (or be re-opened).
I believe you could create an RT::Scrip that uses a user defined condition to check for a approval deny/approve and then perform some logic like setting the linked tickets status to closed in the custom action.
Are you able to apply scrips to the __Approvals queue? If not you may need to do some checks in the user defined section to see if the ticket being resolved is an approvals ticket
I don’t have the final code ready for you but here are my thoughts:
Create a Scrip “On Status Change”
Use this snippet to check for your approvals queue:
if ($ticket->QueueObj->Name eq ‘APPROVALS’){
if($self->TicketObj->Status eq ‘resolved’){
ResolveLinkedTicket;
}
if($self->TicketObj->Status eq ‘resolved’){
ReopenLinkedTicket;
}
}
For the referring ticket you should be able to use something like $self->TicketObj->RefersTo
To Close a ticket use SetStatus(‘resolved’) on the ticket that is referred to
Let me know your progress with setting up the scrip and I will be happy to try to assist you.