Expose milestone global ID in the UI
Release notes
The milestone ID is exposed in the milestone page for easy access. Previously, to create a new issue or merge request through the API and assign a milestone to it, you'd have to first find the milestone ID with another API call. Now, you just have to navigate to the milestone page in the UI and copy the milestone ID.
Problem to solve
Finding the global milestone ID can be cumbersome. To create a new issue via the API and assign it to a milestone, you'd have to:
- Create the milestone.
- Use the API to retrieve the global ID of the milestone:
-
If it's a group milestone (for example https://gitlab.com/groups/gitlab-org/-/milestones/60):
curl --header "PRIVATE-TOKEN: <token>" "https://gitlab.com/api/v4/groups/gitlab-org/milestones?iids[]=60" | jq
-
If it's a project milestone (for example %10.0):
curl --header "PRIVATE-TOKEN: <token>" "https://gitlab.com/api/v4/projects/gitlab-org%2Fgitlab/milestones?iids[]=30" | jq
-
- Use the
id
as themilestone_id
value to assign it to the issue.
This actually came as a question in Slack, and the result was to clarify this in the docs !59690 (merged).
Intended users
Developers and users that want to use the API to automate.
User experience goal
The user should be able to navigate to a milestone in the UI and find its global ID.
Proposal
Expose the global ID of a milestone in the milestone page.
Further details
Permissions and Security
You need developer permissions to create/edit/delete milestones, but if the project is public, anyone with an access token can get the information.
Documentation
We might need to update the docs in various places. Basically everywhere the milestone ID is used. I might miss something, but I found so far:
- https://docs.gitlab.com/ee/api/milestones.html
- https://docs.gitlab.com/ee/api/group_milestones.html
- https://docs.gitlab.com/ee/api/issues.html
- https://docs.gitlab.com/ee/api/merge_requests.html
- https://docs.gitlab.com/ee/api/epics.html
Availability & Testing
Available Tier
Free
What does success look like, and how can we measure that?
Happy developers
What is the type of buyer?
Is this a cross-stage feature?
No.