Ensure legacy types use full page reload from work items list
Feature context
This MR is part of a series of MRs that will ensure we always load the legacy views for incidents and Service Desk issues until they're migrated to work items (or we created all missing widgets). There's a POC that I'll update regularly that contains all workflow paths.
-
👷 Detail view of unsupported types uses legacy view (no matter the user preference) -
🎯 List view -- we're here👈 - Do the full page load for unsupported types (and load legacy view)
- Don't open the drawer (behind FF) and instead do the full page load for unsupported types
- Work items feedback badge not visible on detail page of unsupported types
- New route
- Add type selection to
work items new modal(so users can continue to create incidents from issue list) -
👷 Add missing widgets to incidents (that already exist) - Open work items new modal from incidents list with preselected type (no type selection)
- Add type selection to
What does this MR do and why?
Contributes to Ensure incidents and Service Desk issues use le... (#502823 - closed)
Ensure legacy types use full page reload from work items list
Incidents and Service Desk issues should continue to use the legacy issue detail view even after setting the user preference use_work_items_view to true.
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.
- Ensure incidents and Service Desk issues use le... (#502823 - closed)
- Draft: [POC] Service Desk issues and incidents ... (!174167 - closed)
- Issue list and detail use legacy view for unsup... (#512027 - closed)
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.
With feature flag 🎏 :issues_list_drawer = off:
With new issue look = off:
| Before | After |
|---|---|
| Screen_Recording_2024-12-17_at_14.38.00 | No change |
With new issue look = on:
| Before | After |
|---|---|
| Screen_Recording_2024-12-17_at_14.45.32 | Screen_Recording_2024-12-17_at_14.47.58 |
With feature flag 🎏 :issues_list_drawer = on:
With new issue look = off:
| Before | After |
|---|---|
| Screen_Recording_2024-12-17_at_14.43.02 | No change |
With new issue look = on:
| Before | After |
|---|---|
| Same as above |
Screen_Recording_2024-12-17_at_14.50.43 |
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
In order to test everything we need to create a few records.
-
Select a project (by default flightjs) and create a Service Desk issue and an incident. Note that incidents are already work items under the hood but use legacy list and show views.
user = User.find_by(username: 'root') # Adjust to your local username. Root is id 1 project = Project.find(7) # Or select another project. Get the id from the project general settings page ::Issues::CreateService.new( container: project, current_user: Users::Internal.support_bot, params: { title: 'Service Desk issue', description: 'Easy to spot Service Desk issue', confidential: true, external_author: 'user@example.com' }, perform_spam_check: false ).execute ::WorkItems::CreateService.new( container: project, current_user: user, params: { title: 'Incident', description: 'Easy to spot Incident', work_item_type: ::WorkItems::Type.find_by(base_type: 1) # incident }, widget_params: {} ).execute -
Create a regular issue (or reuse an existing one from the seeds)
-
Enable the feature flag
work_items_view_preferenceFeature.enable(:work_items_view_preference) -
Browse to
http://127.0.0.1:3000/flightjs/Flight/-/issues(change to your selected project) -
Ensure the
new issue lookis turnedoff. -
Make sure you can see at least one regular issue, the Service Desk issue and an incident in the list view.
-
Now select each of them, see it performs a full page load (current behavior).
-
Ensure
new issue lookis turnedon. -
Browse to
http://127.0.0.1:3000/flightjs/Flight/-/issues(change to your selected project). -
Select the
issue. This should use the router (no hard reload) and render the work items detail view. -
Go back to the issue list.
-
Select the
incident. The browser should perform a full page load. (until !175109 (merged) wasn't merged this will correctly show the work item view) -
Go back to the issue list.
-
Select the Service Desk issue. The browser should perform a full page load. (until !175109 (merged) wasn't merged this will correctly show the work item view)
-
Enable the feature flag
:issues_list_drawervia the console or viahttp://127.0.0.1:3000/rails/features:Feature.enable(:issues_list_drawer) -
Browse to
http://127.0.0.1:3000/flightjs/Flight/-/issues(change to your selected project) -
Ensure the
new issue lookis turnedoff. -
Make sure you can see at least one regular issue, the Service Desk issue and an incident in the list view.
-
Now select each of them, see the item opens in the drawer (current behavior).
-
Ensure
new issue lookis turnedon. -
Browse to
http://127.0.0.1:3000/flightjs/Flight/-/issues(change to your selected project). -
Select the
issue. The item should open in the drawer and render the work items detail view. -
Go back to the issue list.
-
Select the
incident. The browser should perform a full page load. (until !175109 (merged) wasn't merged this will correctly show the work item view) -
Go back to the issue list.
-
Select the Service Desk issue. The browser should perform a full page load. (until !175109 (merged) wasn't merged this will correctly show the work item view)