Scope milestones on swimlane boards to project and its ancestors [RUN AS-IF-FOSS]
requested to merge 295626-when-epic-swimlanes-are-enabled-milestones-are-incorrectly-scoped-in-boards-sidebar into master
What does this MR do?
Given an issue, we can only assign milestones with the following scopes to the issue:
- the milestones scoped to the issue's project.
- the milestones scoped to the parent(direct) groups of the issue's project.
However, when Swimlanes is active in Issue Boards, every milestone accessible from the top group shows up in the milestone dropdown regardless of the selected issue.
Example:
Given the following group/project structure, the milestones specific to top-level-project
shouldn't be available to the issues of sub-group-project
.
graph TB
subgraph "Main Graph"
Node1[top-level-group] --> Node2[sub-group]
Node1 --> Node3[top-level-project]
Node2 --> SubGraph1[sub-group-project]
end
This MR changes the Milestones query to fetch only the milestones of the issue's parent project and its direct ancestors. This is consistent with milestones that are fetched on Issue Detail dropdown.
Screenshots (strongly suggested)
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Related to #295626 (closed)
Edited by Nicolò Maria Mezzopera