Reload on type change to incident & add promote_to_incident quickaction

What does this MR do and why?

Contributes to Ensure incidents and Service Desk issues use le... (#502823 - closed)

Solves Ensure /type incident reloads the page (#512031 - closed)

Solves Support /promote_to_incident on (issue) work items (#512032 - closed)

Reload on type change to incident & add promote_to_incident quickaction

Incidents haven't been migrated to work items yet and so when we change the type to incident we want the page to reload. This will render the legacy incidents view and ensure everything is working correctly.

When the issue drawer feature flag is enabled we make sure we browse to the legacy incident detail page.

Additionally we make the /promote_to_incident quick action available for supported work items.

References

Please include cross links to any resources that are relevant to this MR. This will give reviewers and future readers helpful context to give an efficient review of the changes introduced.

MR acceptance checklist

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

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

From the detail view only

Before After
Screen_Recording_2025-02-04_at_16.33.23 Screen_Recording_2025-02-04_at_15.22.09

From the list view with drawer feature flag enabled

Before After
Screen_Recording_2025-02-04_at_17.20.24 Screen_Recording_2025-02-04_at_17.12.53

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Enable the feature flag work_items_view_preference so you see the "new issue look" badge in the issue list.
  2. Enable the New issue look by selecting the badge in the issue list and enabling the toggle.
  3. Create an issue
  4. You should see the work items detail view rendering (not in the drawer, but full page view)
  5. Try the following quick actions in a comment and see that a) the type changes to incident and b) the frontend performs a full page reload and then renders the legacy incidents detail view.
    1. After each quick action execution (in the legacy incidents detail view), select Edit and select the type Issue again. The page reloads and renders the work items view again.
    2. /type Incident
    3. /promote_to Incident
    4. /promote_to_incident (added with this MR for work items)
    5. You can also test using the quick action with some other text, the reload still happens. Or use /type Task to check that it doesn't happen for other types.
  6. Then enable the feature flag issues_list_drawer and browse to the issues list view.
  7. Select the issue under test and see it opens in the drawer view.
  8. Now add the same quick actions to a comment and see that you'll be taken to the legacy detail view.
  9. Change the type back to issue, browse back to the issue list and do it again for the remaining quick actions.
Edited by Marc Saleiko

Merge request reports

Loading