Add feature flag to lock epic work items
What does this MR do and why?
Fixes: #498744 (closed)
This feature flag enables all policies for modifying epics from the work item side by default.
This feature flag is introduced to ensure we can safely rollback
work_item_epics
which is a per-group feature flag.
However, once work_item_epics
gets introduced for a group, some
resources (like Notes) are stored on the work item side.
This then can lead to issues on the legacy experience in combination with our unification code. For example:
-
work_item_epics
are enabled - A note gets created that is associated with the work item
-
work_item_epics
gets disabled again
Now, when commenting on a thread or reacting on the Note on the legacy
experience and query the noteable
object, we receive the WorkItem
.
When performing policy check, we'd not allow the WorkItem
object to be
modified, even though the comment came from the legacy side.
Notes is just one example, but there are more of these scenarios in our
code.
To prevent the problem, we're introducing lock_work_item_epics
, so
we can prevent changes through the work item side if needed, while
enabling modification by default.
The reason we chose to add a new feature flag instead of removing the check completely is that our WorkItem APIs do not have any checks in place to modify epic work items. They rely on this policy.
We do not foresee to enable this feature flag in production but rather remove the check completely as soon as we're confident that the epic work item API works.
Changelog: added EE: true
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 |
---|---|
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.