Why does a resolved ticket keeps opening on correspondence?

Hi everyone,

can someone explain to me why the ticket still gets opened?

my @QueueList = qw(DE_Testqueue);
my $Days = 1; # 1 sec

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 &&
     $TicketObj->Status eq 'resolved' &&
     time() - $TicketObj->ResolvedObj->Unix > $Days ) {
  return 1; # send mail template
} else {
  $TicketObj->SetStatus( 'open' );
  return 0; # don't send mail template
}

the part that is not working is:
$TicketObj->Status eq ‘resolved’ &&

if I replace it with:
$QueueObj->IsInactiveStatus( $TicketObj->Status )
code from (AutoOpenProblem - Request Tracker Wiki) it works,
but I can’t use this because ‘stalled’ is also an inactive state and we only want to sent out mail if the status equals ‘resolved’

Many thanks in advance and Best Regards.

silly me, there was a second global test scrip from a collegue which was acting also on correspond status.
deleted it, and voila! It works

1 Like