Avoid duplicate items in Epic widget
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:
- 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 Epic work items
Feature.enable(:namespace_level_work_items)
- Create few Epics under a Group
Steps to verify:
- Enable Epic work items
Feature.enable(:display_work_item_epic_issue_sidebar)
- Login with any user
- Go to the Group's Project > Issues > List
- Create an new Issue
- Go to Issue detail page
- Check the Epic widget and see if list does not have any duplicate items
Related to #430141 (closed)
Edited by Rajan Mistry