Skip to content

Avoid duplicate items in Epic widget

Rajan Mistry requested to merge 430141-avoid-parent-item-duplicates into master

What does this MR do and why?

When the sync_epic_to_work_item and sync_work_item_to_epic feature flags were on, duplicate items were listed in Issue sidebar Epic widget. This was due to group.epics and group.workItems queries being used in same call. Now, as the items are in sync, the items are not duplicated but we need to separate both the queries and call them based on the flag display_work_item_epic_issue_sidebar.

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

Screen Recording 2024-07-04 at 2.28.30 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 Epic work items Feature.enable(:namespace_level_work_items)
  3. Create few Epics under a Group

Steps to verify:

  1. Enable Epic work items Feature.enable(:display_work_item_epic_issue_sidebar)
  2. Login with any user
  3. Go to the Group's Project > Issues > List
  4. Create an new Issue
  5. Go to Issue detail page
  6. Check the Epic widget and see if list does not have any duplicate items

Related to #430141 (closed)

Edited by Rajan Mistry

Merge request reports