Show quick action errors inline instead of a page-level alert

What does this MR do and why?

When a quick action response carries both quickActionsStatus.errorMessages (rendered as an alert next to the comment editor) and top-level errors (for example /type Incident on a work item that has a parent, where the type change fails model validation), work_item_add_note.vue threw the top-level error from onNoteUpdate. The throw rejected the mutation promise before the code that sets the inline alert ran, so the user got a page-wide error banner at the top of the page instead of the message beside the editor.

The fix has three parts:

  1. onNoteUpdate skips the throw when the response has inline errorMessages, letting the existing inline alert render (the same treatment the file already gives two other special-case shapes). Responses with top-level errors and no inline message keep the page-level path.
  2. The incident type-change full page reload (added by Reload on type change to incident (!180205)) fired on the comment text alone, even when the type change had failed, which would wipe the inline alert the moment it rendered. The reload is now gated on the quick action having succeeded, reusing the success check the time-tracking refetch already applies.
  3. The success summary is suppressed when the response carries errorMessages: the server builds messages while parsing the note, before commands apply, so a failed apply would still render "Type changed successfully." beside the real error.

Approach endorsed in-thread: the reporter proposed exactly this check, and clavimoniere confirmed the inline pattern is the intended surface ("mostly just a plumbing matter"). No copy changes.

Resolves Quick action error not displayed at content editor (#517312).

References

Screenshots or screen recordings

Before After
type_change_error type_change_error

Incidental difference beside the moved alert: the editor clears because the response is handled instead of rejected.

How to set up and validate locally

  1. Create an issue and add a child task to it (any work item with a parent works).
  2. On the child work item, add a comment containing only /type Incident and submit.
  3. Before: a page-level error banner appears at the top ("Validation Work item type cannot be changed to incident when linked to a parent issue.") and nothing renders by the editor. After: the message renders as a danger alert directly above the comment form and the editor clears.
  4. Submit a comment with a quick action that fails without an inline message (or force a server error): the page-level banner still appears.

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Paul W

Merge request reports

Loading
Loading