Commit 6a435e12 authored by Ruslan Zakirov's avatar Ruslan Zakirov
Browse files

don't set default SLA for non-tickets

eg RT::Ticket with type other than 'ticket',
for example reminder
parent be4d67e0
......@@ -16,7 +16,9 @@ value set.
sub IsApplicable {
my $self = shift;
return 0 unless $self->TransactionObj->Type eq 'Create';
return 0 if $self->TicketObj->FirstCustomFieldValue('SLA');
my $ticket = $self->TicketObj;
return 0 unless lc($ticket->Type) eq 'ticket';
return 0 if $ticket->FirstCustomFieldValue('SLA');
return 0 unless $self->SLAIsApplied;
return 1;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment