Skip to content

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:

#465397 (comment 1937354759)

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:

  1. 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).
  2. Enable the namespace Epic work item feature Feature.enable(:namespace_level_work_items, Group.find(<GROUP_ID>))
  3. Feature.enable(:issues_list_drawer) to enable list drawer in issue list

Steps to verify:

  1. Login with any user
  2. Go to any Group > Epics
  3. Change the URL from http://gdk.test:3000/groups/gitlab-org/-/epics > http://gdk.test:3000/groups/gitlab-org/-/work_items
  4. Create a new Epic work item
  5. Go to Epic detail page
  6. Make sure the URL is http://gdk.test:3000/groups/gitlab-org/-/work_items/ID
  7. Create an Issue under any project under the Child items section since the FF is enabled on the group level
  8. Open the issue in new tab
  9. Create a Task under Child items section
  10. Open the task and check the ancestry widget above title
  11. It should list Epic and the Issue
  12. Disable the namespace Epic work item feature Feature.disable(:namespace_level_work_items, Group.find(<GROUP_ID>))
  13. Refresh the page
  14. Check if the ancestry widget is not available on Task

Steps to verify drawer:

  1. Go to Issue list page
  2. Click on any Task
  3. Check if ancestry widget is available or not based on the namespace_level_work_items FF

Related to #465397 (closed)

Edited by Rajan Mistry

Merge request reports

Loading