Add `Move` button to Work Items (Issue type) detailed view

What does this MR do and why?

Add move button to the work item detailed page action menu. For now, we are doing legacy parity, so we only display the button for Issue type and if the user is allowed to move the work item.

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.

Before After
No move button Screenshot_2025-02-07_at_4.44.18_PM

Screen_Recording_2025-02-04_at_11.30.40_AM

UI behaviors Image
Modal when opened Screenshot_2025-02-03_at_7.26.27_PM
Project selected - WI with no children Screenshot_2025-02-07_at_4.09.25_PM
Project selected - WI with children or not able to fetch children Screenshot_2025-02-07_at_4.09.10_PM
No project found Screenshot_2025-02-04_at_12.28.13_PM
Error moving alert Screenshot_2025-02-07_at_4.26.29_PM

How to set up and validate locally

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

  1. Open an Issue work item type
  2. Click on the header action menu

If you are allowed to move this issue (userPermissions.canMove: true / Planner+):

  • expect to see the Move button
  • expect that when clicking on it, a modal appears and looks like the design
  • expect that the Move button is initially disabled and only enabled when a project is selected
  • expect that modal says Move in the title and Project above the dropdown (please ignore some images as they don't reflect new changes)
  1. Open the dropdown
  • expect to see a list of projects that you have at least Planner role or No project found if you don't have projects
  • If an error when fetching projects occurs, expect to see Failed to load projects in the dropdown
  1. Try searching for a project name
  • expect that the search works as expected
  1. Select a project
  • expect that the project namespace path appears under the dropdown
  • If the issue has children or an error happened to fetch it, expect that the warning All child items will also be moved to the selected location. appears under the path
  • If the issue does not have children, no children warning should appear
  1. If moving was successful: expect that clicking Move closes the modal and redirects to the new issue page in the selected project (/issues/:id)
  • expect that the child items from the issue also closed and moved to the new project
  1. If moving has errors: expect that the modal stays open and an alert on top appears with the message Could not be moved. Select another project or try again.
  • expect that closing the modal, clicking on alert close button, or clicking on dropdown again closes the alert

Note: You should be able to move closed issues too, if you have access (I'm checking with BE why I am getting errors locally)

If you are not allowed to move this issue or you open another work item type:

  • expect to NOT see the Move button on the menu

Related to #514612 (closed)

Edited by Fernanda Toledo

Merge request reports

Loading