Skip to content

Add /remove_parent quick action for work items

What does this MR do and why?

Add /remove_parent quick action for work items

This quick action removes the parent from the current work item, if permitted.

Screenshots or screen recordings

Screen_Recording_2024-01-18_at_14.03.04

How to set up and validate locally

  1. Enable the feature flag :mvc_okrs
  2. In the rails console, create two work items:
project, user = Project.first, User.first
WorkItem.create!(title: 'key result 1', author: user, project: project, work_item_type_id: key_result_type_id, issue_type: :key_result)
WorkItem.create!(title: 'key result 2', author: user, project: project, work_item_type_id: key_result_type_id, issue_type: :key_result)
  1. Visit the first work item using the work items view, for example: http://127.0.0.1:3000/group/project3/-/work_items/1.
  2. Set the second quick action as the parent, using this quick action /set_parent #2
  3. Test the new quick action by typing /remove_parent #2 in a new comment.
  4. Confirm that the second work item is removed from being the parent to the first one.

Related to #434344 (closed)

Merge request reports