Ensure incidents and Service Desk issues use legacy views and workflows
We'd like to ensure that incidents will work using legacy views and workflows although issues and epics use the new work item views.
With the feature flag work_items_view_preference
we allow users to switch to the new work item view for all issues and work items using the user preference use_work_items_view
.
This involves all workflows related to incidents and Service Desk issues:
- Create workflow
- List and browse to detail view
- Detail view
Feature flags and migration to work items path
We don't care about the work_items_alpha
or work_items_beta
and so just respect the type. Once we start work on actually migrating to work item incidents or tickets we can guard these conditions with feature flags. Here I decided against introducing another feature flag because conditions are already complex enough and we don't indent to flip switches here. Incidents and Service Desk issues should just use the legacy views no matter the feature flags and settings.
Functionality overview
- New route
-
Legacy view: We reuse the legacy view and
- Option a) (current POC behavior) remove the option to change the type from
incident
to something else (for example if you selectnew incident
from the incidents list page). - Option b) remove the
type
select altogether and usenew incident
language throughout the view.
- Option a) (current POC behavior) remove the option to change the type from
-
Work items view: If you select the type
Incident
we’ll redirect you to the legacy view with only the incident type option.
-
Legacy view: We reuse the legacy view and
- Links from list view (full reload instead of router)
- We determine whether we use the router to load the detail view or browse to the detail view for the legacy view.
- This now includes a type condition so links to incidents and Service Desk issues will always browse to the legacy view.
- Detail view
- Depending on the user preference we render a different
haml
file and run different javascript. The logic now includes the type condition mentioned above, so when you access an incident or Service Desk issue directly it will always render the legacy view.
- Depending on the user preference we render a different
- Work items feedback badge. The badge doesn’t render on
- Legacy incidents view
- Legacy Service Desk issues view
- Legacy new view
Implementation
-
✅ Detail view renders legacy view for unsupported types. -
✅ Links from list view browse to legacy view instead of using the router -
✅ Don't render work items feedback badge for unsupported types. -
✅ Use work item create workflow for new incidents from incidents list -
✅ Use work item create workflowin modalfor new incidents from issue list