Hide work items ancestry widget on tasks
What does this MR do and why?
The Task shows ancestry widget in the breadcrumb when there is a parent linked to it. The issue occurs in case of a Task which is part of any Issue whose parent is an Epic. When you click on the Epic, it basically throws 404
when namespace_level_work_items
is enabled. This is because the webUrl
from backed is of /work_items
. The /work_items
path is not available in case namespace_level_work_items
is disabled.
This is a temporary fix in the frontend to hide the ancestry widget itself if namespace_level_work_items
is disabled.
References:
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
namespace_level_work_items enabled | namespace_level_work_items disabled |
---|---|
Screen Recording 2024-06-17 at 8.18.18 PM.mov | Screen Recording 2024-06-17 at 8.25.39 PM.mov |
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(:issues_list_drawer)
to enable list drawer in issue list
Steps to verify:
- Login with any user
- Go to any Group > Epics
- Change the URL from http://gdk.test:3000/groups/gitlab-org/-/epics > http://gdk.test:3000/groups/gitlab-org/-/work_items
- Create a new Epic work item
- Go to Epic detail page
- Make sure the URL is http://gdk.test:3000/groups/gitlab-org/-/work_items/ID
- 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>))
- Refresh the page
- Check if the ancestry widget is not available on Task
Steps to verify drawer:
- Go to Issue list page
- Click on any Task
- Check if ancestry widget is available or not based on the
namespace_level_work_items
FF
Related to #465397 (closed)