Remove SLA (Due Date) from Ticket on Move to "no SLA" Queue

The Question
How can we force the Due Date and/or the SLA value to be cleared when moving a Ticket from an “SLA Enabled” Queue to a Queue that does NOT have “SLA Enabled”.

The Context
For simplicity of explanation, we can say that we have 2 Queues.

  1. “Default” Queue. This has “SLA Enabled” checked and Tickets are correctly being assigned a Due Date and Service Level when they arrive in this Queue.
  2. “Internal Requests” Queue. This Queue does NOT have “SLA Enabled” checked.

The Problem
When we move Tickets from the “Default” (SLA) Queue to the “Internal Requests” (no SLA) Queue (either by hand, or via a Scrip"), the Ticket retains it’s Due Date AND, in the database record, the name of the ServiceLevel (in the SLA column) that was assigned on creation (though this isn’t visible in the UI at this point).

Our escalation cron jobs then cannot distinguish between an Overdue Ticket in an “SLA Enabled” Queue vs a “not SLA Enabled” Queue.

Alternative Solution
How can we modify the following conditions in our escalation cron to exclude Tickets in a “no SLA” Queue…
/opt/rt5/bin/rt-crontool
–search RT::Search::FromSQL
–search-arg “(Status = ‘new’ OR Status = ‘open’ OR Status = ‘stalled’)”
–condition RT::Condition::Overdue \

We are running RT 5.0.2.

Thanks!

In your search, can you add something like (..existing search..) AND queue != 'No SLA'?

Hi! Thanks for taking the time to reply.

That is an option… but to be honest, I was looking for something a little more elegant, e.g. relying on Queue names in my search-arg doesn’t seem very future proof, e.g. if I add more “no SLA” type Queues in the future (or even change the name of the existing Queue), I’d like to avoid having to remember to update all my cron job search-args.

A solution that excludes Tickets in ANY “SLA Enabled” = false type of Queue, regardless of Queue name, would be optimal…

The other option is to make a scrip that runs when the transaction type is a queue set transaction, and check if the new queue the ticket is being moved to has SLA enabled. If not then you can delete the current due date on the ticket

Sounds good…

I see - by examining /opt/rt5/lib/RT/Queue.pm (the online documentation does not mention this) - that Queue object has property SLADisabled that indicates whether SLA Enabled is checked or not.

However I couldn’t work out how to “delete the current due date on the ticket”… RT documentation mentions a Ticket method to SetDue(), but I couldn’t set an empty string. Any idea what value (or alternate method) would effectively “delete” the current value?

I believe setting the date to '1970-01-01 00:00:00' works

Ah ha! The old “min date means no date” switcheroo? :grinning:

Thanks I’ll give that a try.