SLA input on the update page should default to the ticket's current SLA#420
SLA input on the update page should default to the ticket's current SLA#420arr2036 wants to merge 1 commit into
Conversation
The SLA dropdown on Ticket/Update.html was pre-selected with the queue's default service level rather than the SLA the ticket already has. ProcessTicketBasics writes whatever the form submits, so replying or commenting without touching the dropdown silently reset the ticket's SLA to the queue default whenever the two differed. Prefer the ticket's current SLA, keeping the submitted value first for re-rendered forms and the queue default as the fallback for tickets that have no SLA yet.
|
According to internal testing this has been an issue since 4.x.x, probably earlier. We have a custom scrip, that looks up the email domain of the user, and sets an SLA based on that. Guessing that's not super common, so we're probably getting bitten when others aren't. |
@arr2036 Do you still see the issue if you run with your custom scrip disabled? |
|
Correct. If I make a new ticket from the Web UI, with a non-queue-default SLA, and the scrip disabled, and then reply to it, the SLA defaults back to the queue default... So I guess that disproves it's my "just us" theory. So now I'm confused, as to why no one else is complaining. |
The SLA dropdown on
Ticket/Update.htmlis pre-selected with the queue's default service level (RT::SLA->GetDefaultServiceLevel( Queue => ... )) rather than the SLA the ticket already has.ProcessTicketBasicsincludesSLAin the attributes it writes on submit, so replying or commenting without touching the dropdown silently resets the ticket's SLA back to the queue default whenever the two differ.To reproduce on 6.0-trunk (or 6.0.3):
This change prefers the ticket's current SLA when building the dropdown default, keeping the submitted
$ARGS{SLA}first so re-rendered forms preserve the operator's choice, and keeping the queue default as the fallback for tickets that have no SLA yet. The ticket Basics editing on the display page already behaves this way, because/Elements/SelectSLAfalls back to$TicketObj->SLAwhen no default is passed; the update page widget was overriding that fallback.