Skip to content

SLA input on the update page should default to the ticket's current SLA#420

Open
arr2036 wants to merge 1 commit into
bestpractical:6.0-trunkfrom
arr2036:6.0/update-page-sla-default-to-ticket-sla
Open

SLA input on the update page should default to the ticket's current SLA#420
arr2036 wants to merge 1 commit into
bestpractical:6.0-trunkfrom
arr2036:6.0/update-page-sla-default-to-ticket-sla

Conversation

@arr2036

@arr2036 arr2036 commented Jul 14, 2026

Copy link
Copy Markdown

The SLA dropdown on Ticket/Update.html is pre-selected with the queue's default service level (RT::SLA->GetDefaultServiceLevel( Queue => ... )) rather than the SLA the ticket already has. ProcessTicketBasics includes SLA in 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):

  1. Configure two service levels, and a queue whose default is level A.
  2. Create a ticket in the queue and set its SLA to level B.
  3. Open Reply on the ticket. The SLA dropdown shows level A.
  4. Submit the reply without touching the dropdown: the ticket's SLA is now level A again, with only a hard-to-notice transaction recording the change.

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/SelectSLA falls back to $TicketObj->SLA when no default is passed; the update page widget was overriding that fallback.

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.
@arr2036

arr2036 commented Jul 14, 2026

Copy link
Copy Markdown
Author

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 arr2036 changed the title Default the SLA input on the update page to the ticket's current SLA SLA input on the update page should default to the ticket's current SLA Jul 14, 2026
@cbrandtbuffalo

Copy link
Copy Markdown
Member

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?

@arr2036

arr2036 commented Jul 15, 2026

Copy link
Copy Markdown
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants