Fix roadmap filtering for nested epics
What does this MR do and why?
Second iteration for #412302 (closed)
In !123070 (merged) we introduced a new fix for duplicated child epics in roadmaps but it missed an edge case where filters apply to skipped levels of nesting. See !123070 (comment 1429762331)
Screenshots or screen recordings
Before | After |
---|---|
roadmap_filter_nested_children_before | roadmap_filter_nested_children_after |
How to set up and validate locally
- Open rails console and create a group with nested epics:
user = User.first
start_date = 1.month.ago
end_date = Date.today + 2.months
group = Group.create!(name: 'Group with Roadmap', path: 'roadmap_group2')
label = GroupLabel.create!(title: 'Pink', group: group)
epic_1 = Epic.create!(title: 'Epic 1', author: user, start_date: start_date, end_date: end_date, group: group)
epic_2 = Epic.create!(title: 'Epic 2', author: user, start_date: start_date, end_date: end_date, group: group, parent: epic_1, labels: [label])
epic_3 = Epic.create!(title: 'Epic 3', author: user, start_date: start_date, end_date: end_date, group: group, parent: epic_2)
epic_4 = Epic.create!(title: 'Epic 4', author: user, start_date: start_date, end_date: end_date, group: group, parent: epic_3, labels: [label])
- Visit the group's roadmap and verify that filtering by the label
Pink
displaysEpic 2
andEpic 4
.
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