Make work items read-only when it has a synced epic
What does this MR do and why?
Related to #442051 (closed)
We need to make work items read-only when there is an associated synced epic to prevent records from being out of sync.
Changes summary:
- Prevent modifying a work item by preventing the following policies when a synced epic is present:
:admin_work_item_link
:admin_work_item
:update_work_item
:set_work_item_metadata
- :create_note
-
:admin_parent_link
(pending, will be handled in a follow-up) :award_emoji
:create_todo
:update_subscription
:create_requirement_test_report
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.
How to set up and validate locally
- In rails console enable the experiment fully
Feature.enable(:epic_creation_with_synced_work_item)
- Visit any group and create an epic
Epic with synced work item
- Visit the list of work items at the group level (e.g
http://127.0.0.1:3000/groups/<group-path>/-/work_items
) and find the newest work item, it should have the same title as the epic - Verify that it cannot be updated (title, description or sidebar fields)
- Verify that quick actions and notes creation are not supported
Edited by Eugenia Grieff