Skip to content

Fix "Hide work items ancestry widget on tasks" regression

Rajan Mistry requested to merge ramistry-task-ancestry-widget-regression into master

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:

  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
    1. Feature.enable(:namespace_level_work_items, Group.find(<GROUP_ID>))
    2. Feature.enable(:work_item_epics, 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. Create a new Epic work item
  4. Go to Epic detail page
  5. Create an Issue under any project under the Child items section since the FF is enabled on the group level
  6. Open the issue in new tab
  7. Create a Task under Child items section
  8. Open the task and check the ancestry widget above title
  9. It should list Epic and the Issue
  10. Disable the namespace Epic work item feature
    1. Feature.disable(:namespace_level_work_items, Group.find(<GROUP_ID>))
    2. Feature.disable(:work_item_epics, Group.find(<GROUP_ID>))
  11. Refresh the page
  12. Check if the ancestry widget is not available on Task

Merge request reports

Loading