AutoOpenProblem

From Request Tracker Wiki
Jump to navigation Jump to search

Problem

A common problem is users replying to a resolved ticket by email and re-opening the ticket. It's often "thanks" note, sometimes it's a completely new problem that should be in a new ticket, but sometimes it's real follow up on the subject.

It's hard to tell what is the best solution, but here is some ways to deal with it besides default RT behaviour to open tickets.

Just stop re-opening if ticket is resolved

This one way to go. People still get notifications, however such tickets don't pop in active and can be overlooked. Take the following steps to implement:

  • Go to the scrip editor (Configuration -> Global -> Scrips).
  • Edit scrip #1 - On Correspond Open Tickets with template Blank
  • Change the Condition from On Correspond to User Defined
  • Set the Custom condition field as below:
return 0 unless $self->TransactionObj->Type eq 'Correspond';
return 0 if $self->TicketObj->Status eq 'resolved';
return 1;
  • Click on the Update button to save your changes.

Later you can revert it back, edit scrip #1 again and change the Condition back to On Correspond, then click on Update.

Stop re-opening if ticket is resolved more than 7 days and send an autoreply

Create an new global template. Change the global scrip "On Correspond Open Tickets with template Blank" this way:

  • Condition: User Defined
  • Action: Autoreply To Requestors
  • Template: the new template

Put this in Custom condition:

my @QueueList = qw(queuename1 queuename2);
my $Days = 60*60*24*7; # 7 days

my $TransactionObj = $self->TransactionObj;
my $TicketObj = $self->TicketObj;
my $QueueObj = $TicketObj->QueueObj;
my $QueueName = $QueueObj->Name;

return 0 unless $TransactionObj->Type eq 'Correspond';

if ( ( grep /$QueueName/, @QueueList ) &&
     $TransactionObj->IsInbound &&
     $QueueObj->IsInactiveStatus( $TicketObj->Status ) &&
     time() - $TicketObj->ResolvedObj->Unix > $Days ) {
  return 1; # send mail template
} else {
  $TicketObj->SetStatus( 'open' );
  return 0; # don't send mail template
}

Additionally, in your environment, the rule (autoreply if ticket closed more than 7 days) only applies to some queues. You have to put the queue names in @QueueList. If you don't need that, remove the first line and remove the @QueueList check from the if.

Fork into a new ticket

Another way to go is to copy message and use it to start a new ticket. Scrip action that does this described in ForkIntoNewTicket.