Ability to remove parent/child link in hierarchy widget
What does this MR do and why?
This MR adds remove actions under a 3 dot menu in work item links on the issue page. The remove button unlinks the parent/child relationship
Screenshots or screen recordings
| Dropdown | Toast |
|---|---|
![]() |
![]() |
How to set up and validate locally
- Enable the feature flags.
Feature.enable(:work_items)
Feature.enable(:work_items_hierarchy)
- Create a new issue
Run Issue.last in the console and note the Issue id eg. #<Issue id:316 ...>. Here ID is 316.
- Edit the description, and add a few task items using the "Convert to work item" button. After each successful creation, run
Issue.lastand keep note of the id. - Run this command in console to create parent/child relationship
WorkItems::ParentLink.create!(work_item_id: CHILD_ID, work_item_parent_id: 316) - Reload and see the child items listed.
- Click on the
ellipsis(3 dot menu) on the right hand side and click remove. - Notice the work item is removed. Click
undoon the toast to add back to the list.
Related to #362861 (closed)
Edited by Rajat Jain

