Skip to content

Allow milestone references to specify a full path

Brett Walker requested to merge 440486-allow-references-to-specify-a-group into master

What does this MR do and why?

Currently, markdown references typically can only reference a group/project. You can't directly reference a group label or group milestone. For example this would work, engineering/mobile/android%"Mobile Milestone", but this engineering/mobile%"Mobile Milestone" would not. This is particularly an issue when you have a reference object valid for both groups and projects.

Now allow / to be prepended, such as /engineering/mobile/android%"Mobile Milestone". This will guarantee it finds that specific milestone only.

This also lays the groundwork for other references to use a full path, such as labels. But those should be handled in other MRs.

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.

How to set up and validate locally

  • create a top-level group names "Engineering". Inside it create a milestone called "Milestone A"
  • inside the "Engineering" group, create a group called "Mobile". Inside it create a milestone called "Milestone A" (yes, same as the one in "Engineering")
  • inside the "Mobile" group, create a project called "iOS". Inside it create a milestone called "Milestone B"
  • put the following into the description. You can use Preview to see how it looks, or save it
- {+valid+} `%"Milestone B"`: %"Milestone B"
- {+valid+} `ios%"Milestone B"`: ios%"Milestone B"
- {-invalid-} `mobile/ios%"Milestone B"`: mobile/ios%"Milestone B"
- {+valid+} `engineering/mobile/ios%"Milestone B"`: engineering/mobile/ios%"Milestone B"
- {+valid+} `/engineering/mobile/ios%"Milestone B"`: /engineering/mobile/ios%"Milestone B"
-
- {+valid+} `ios%"Milestone A"`: ios%"Milestone A"
- {-invalid-} `mobile/ios%"Milestone A"`: mobile/ios%"Milestone A"
- {+valid+} `engineering/mobile/ios%"Milestone A"`: engineering/mobile/ios%"Milestone A"
- {+valid+} `/engineering/mobile/ios%"Milestone A"`: /engineering/mobile/ios%"Milestone A"
-
- {-invalid-} `engineering/mobile%"Milestone A"`: engineering/mobile%"Milestone A"
- {+valid+} `/engineering/mobile%"Milestone A"`: /engineering/mobile%"Milestone A"
- {-invalid-} `engineering%"Milestone A"`: engineering%"Milestone A"
- {+valid+} `/engineering%"Milestone A"`: /engineering%"Milestone A"

The thing to understand is that without this MR, there is no way to specifically reference a group milestone - it only works by referencing the group milestone name from the a project, like ios%"Milestone A", and relying on searching up the group chain. However, this only finds the milestone in engineering/mobile - there is no way to reference the milestone in engineering.

This MR makes it possible to specify the full path with a leading / and reference any milestone directly.

Related to #440486 (closed)

Edited by Brett Walker

Merge request reports