Skip to content

Scope milestones on swimlane boards to project and its ancestors [RUN AS-IF-FOSS]

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

Availability and Testing

Related to #295626 (closed)

Edited by Nicolò Maria Mezzopera

Merge request reports

Loading