Fix "Hide work items ancestry widget on tasks" regression
What does this MR do and why?
The changes in MR !155449 (merged) were regressed due to MR changes in !158891 (merged). The following check is moved from hasParent
to shouldShowAncestors
computed property as we want to override showing ancestry widget in case of Task and feature flags namespace_level_work_items
and work_item_epics
are disabled.
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
Not applicable as a regression is being fixed.
How to set up and validate locally
Prerequisites:
- Enable the OKRs feature as mentioned in the OKRs docs (e.g.
::Feature.enabled?(:okrs_mvc, Project.find(<PROJECT_ID>))
and the namespace must have Ultimate plan). - Enable the namespace Epic work item feature
Feature.enable(:namespace_level_work_items, Group.find(<GROUP_ID>))
Feature.enable(:work_item_epics, Group.find(<GROUP_ID>))
-
Feature.enable(:issues_list_drawer)
to enable list drawer in issue list
Steps to verify:
- Login with any user
- Go to any Group > Epics
- Create a new Epic work item
- Go to Epic detail page
- Create an Issue under any project under the
Child items
section since the FF is enabled on the group level - Open the issue in new tab
- Create a Task under
Child items
section - Open the task and check the ancestry widget above title
- It should list Epic and the Issue
- Disable the namespace Epic work item feature
Feature.disable(:namespace_level_work_items, Group.find(<GROUP_ID>))
Feature.disable(:work_item_epics, Group.find(<GROUP_ID>))
- Refresh the page
- Check if the ancestry widget is not available on Task