RT Essentials CoverAnyone that has spent any time with Best Practical's RT: Request Tracker knows that it is a leader in the open-source ticketing system market. It is both robust and highly configurable. I've used several systems for incident, trouble, and bug tracking over the last 10+ years, but RT is by far my favorite. Not only has it done everything I've needed, but it's open source nature (and price tag) make it a perfect option for any technical team. I've used RT exclusively for the last 5 years and I highly recommend it.

One thing that RT does by default is send an auto-response to a ticket creator whenever their ticket has been changed to 'resolved' status. 99 times out of 100 this is the proper action, but for that other 1% this can be potentially embarrassing.

Some groups want to resolve tickets every time they respond, thus ensuring that only active tickets are open. Other groups want to resolve tickets as they are processed into some other system (legacy applications seem to be the culprit here). Whatever the case, these folks want these auto-responses to stop!

RT uses 'Scrips' to handle these sorts of actions. The problem here is that the scrip that controls the auto-response after the ticket is resolved is a global scrip that applies to all queues. Here's a closeup of the offending global scrip.

RT Auto-Response on Resolve Scrip

Disabling this scrip is no big deal if everyone using the system agrees that auto-responses are not necessary. But if your RT installation is supporting several groups, consensus is unlikely.

Rather than remove the global scrip and then add it back for each queue that wants it, let's edit the scrip so that it does it's normal thing for all queues except the queue that doesn't want auto-responses. For the purposes of this example, we'll assume the queue that doesn't want auto-responses is called 'WebDev'.

In order to accomplish our task, we need to edit the global scrip by adding a 'Custom condition'. The following code can be copied and pasted directly into the 'Customer condition' text area.

if ( ( $self->TicketObj->QueueObj->Name ne "WebDev" ) &&
     ( $self->TransactionObj->Type      eq "Status" ) &&
     ( $self->TransactionObj->NewValue  eq "resolved" )
   ) 
{
  1;
} else {
  undef;
}

This code says that any status changing transaction that sets the status to 'resolved' for any queue not called 'WebDev' should return true, otherwise return undefined. As long as the 'Custom condition' returns true, RT will execute the 'Action' defined in the 'Scrips Fields'. For this code to be used though, we need to change the 'Condition' from 'On Resolve' to 'User Defined'. Once that's done, we can hit the Update button.

RT Scrip Fields with User Defined Condition

Once that's done, you should be able to create test tickets in the "WebDev" queue and resolve them without sending out an auto-response.

Although I've tested this scrip successfully in a production environment, please let me know if you experience problems.

Further Reading