Difference between revisions of "Talk:CustomConditionSnippets"

From Request Tracker Wiki
Jump to navigation Jump to search
m
m
 
Line 17: Line 17:
if ( ( grep /$QueueName/, @QueueList ) &&
if ( ( grep /$QueueName/, @QueueList ) &&
     $TransactionObj->IsInbound &&
     $TransactionObj->IsInbound &&
     '''$TicketObj->Status eq 'resolved' &&'''
     $TicketObj->Status eq 'resolved' &&
     time() - $TicketObj->ResolvedObj->Unix > $Days ) {
     time() - $TicketObj->ResolvedObj->Unix > $Days ) {
   return 1; # send mail template
   return 1; # send mail template
Line 27: Line 27:




the part that is not working is:      $TicketObj->Status eq 'resolved' &&
Many thanks in advance and Best Regards.
Many thanks in advance and Best Regards.

Latest revision as of 12:05, 29 June 2017

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' && Many thanks in advance and Best Regards.