Skip to content

Add Change type option to work items

Rajan Mistry requested to merge 385131-add-change-type-options into master

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.

Task MR link
Add `Change type` to the utility actions menu o... (#474528 - closed) This MR
Confirmation modal with input required to compl... (#474529 - closed) This MR
Add validations when a work item is selected fo... (#474530 - closed) This MR
Add EE and rspecs for change type modal !175435 (merged)
Add Change type support for work item drawer on... (#501062 - closed)
Add Change type support for work item drawer on... (#501061 - closed)

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

Screenshot 2024-12-10 at 10.13.44 PM.png

With parent

Screenshot 2024-12-10 at 10.14.45 PM.png

With non-null fields

Screen Recording 2024-10-28 at 7.45.54 PM.mov

Objective to Key results

with no parent or child item

Screen Recording 2024-10-28 at 8.00.10 PM.mov

Key results to Objective

with no parent or child item

Screen Recording 2024-10-28 at 8.00.46 PM.mov

Issue to Task

with no parent or child item

Screen Recording 2024-10-28 at 8.02.54 PM.mov

Task to Issue

with no parent or child item

Screen Recording 2024-10-28 at 8.04.12 PM.mov

How to set up and validate locally

Prerequisites:

  1. 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).
  2. Enable FF work_items_beta

Steps to verify:

  1. Login with any user
  2. Go to Project > Issues
  3. Open or create an Issue/Objective
  4. In the kebab menu on top-right, find the Change type action
  5. Click on the Change type action to open a modal with related options
  6. Select an option to be converted
  7. Check if a warning appears when
    1. there are child items and the Change type button is disabled
    2. there is a parent linked and the Change type button is disabled
    3. there are non-null fields which are not available in the selected work item type
  8. Click on Change type button
  9. Verify
    1. if the type is changed below the title
    2. if the Close button is showing right text
    3. if the widgets are updated as per the type

Related to #385131 (closed)

Edited by Rajan Mistry

Merge request reports

Loading