Add Change type option to work items
What does this MR do and why?
This MR adds ability to change type of project level work items like Objective, Key result, Task and Issues as work items.
The designs are available here. However, the functionality is served as per the comment.
Limitations:
- If a child item is added/removed in the child item and change type is used, the warning message will not appear upfront without page reload. We need to update the child item cache count in Apollo cache.
- The child items are not handled while changing type. It will be covered as part of #499488
- The parent is not handled while changing type. It will be covered as part of #501424
- Conversion from Issue to Epic is not support. It will be part of #503276
- The option is not available on Epic as it will covered once the backend issue #478486 is cleared.
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
Scenario | Screen recording |
---|---|
With child item | |
With parent | |
With non-null fields | |
Objective to Key results with no parent or child item |
|
Key results to Objective with no parent or child item |
|
Issue to Task with no parent or child item |
|
Task to Issue with no parent or child item |
How to set up and validate locally
Prerequisites:
- Enable the OKRs feature as mentioned in the OKRs docs (e.g.
::Feature.enabled?(:okrs_mvc, Project.find(<PROJECT_ID>))
and the namespace must have Ultimate plan). - Enable FF
work_items_beta
Steps to verify:
- Login with any user
- Go to Project > Issues
- Open or create an Issue/Objective
- In the kebab menu on top-right, find the
Change type
action - Click on the
Change type
action to open a modal with related options - Select an option to be converted
- Check if a warning appears when
- there are child items and the
Change type
button is disabled - there is a parent linked and the
Change type
button is disabled - there are non-null fields which are not available in the selected work item type
- there are child items and the
- Click on Change type button
- Verify
- if the type is changed below the title
- if the
Close
button is showing right text - if the widgets are updated as per the type
Related to #385131 (closed)
Edited by Rajan Mistry