Fix roadmap filters for child epics
What does this MR do and why?
Related to #412302 (closed)
In roadmaps when applying a filter that matches a child epic but not its parent, the child is missing from the results. This happens because we filter epics by topLevelHierarchyOnly
to prevent the following epics duplication:
This MR introduces a new fix for the duplication bug that allows us to remove the topLevelHierarchyOnly
argument from the GraphQL query.
Screenshots or screen recordings
Before | After |
---|---|
How to set up and validate locally
- Open
rails console
and create a group with epics:
user = User.first
start_date = 1.month.ago
end_date = Date.today + 2.months
group = Group.create!(name: 'Group with Roadmap', path: 'roadmap_group1')
label = GroupLabel.create!(title: 'Pink', group: group)
parent_a = Epic.create!(title: 'Parent A', author: user, start_date: start_date, end_date: end_date, group: group)
child_a = Epic.create!(title: 'Child A', author: user, group: group, parent: parent_a)
subchild_a = Epic.create!(title: 'Subchild A', author: user, start_date: start_date, end_date: end_date, group: group, parent: parent_a)
parent_b = Epic.create!(title: 'Parent B', author: user, start_date: start_date, end_date: end_date, group: group)
child_b = Epic.create!(title: 'Child B', author: user, start_date: start_date, end_date: end_date, group: group, parent: parent_b, labels: [label])
- Visit the group's roadmap and verify that epics are displayed correctly:
Collapsed | Expanded |
---|---|
- Filter epics by the
Pink
label and verify thatChild B
is the only result:
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Eugenia Grieff