Changing the milestone in the sidebar to a Group milestone renders an incorrect URL
Summary
Selecting a group milestone in the sidebar on the issues detail page would render a URL linking to a project milestone instead of the group milestone. Refreshing the page fixes the URL.
Steps to reproduce
Required data:
- A group named
dev
which has some new Group milestones. - Various projects in that
dev
group which all used project-milestones (for all projects in the group) in the past.
That means that you had milestones with incrementing id's starting from 1 per project. The new group milestones their id's also start incrementing from 1.
If you assign an issue to a group milestone (e.g. the one with id 1) in the sidebar of the issue detail page than the rendered JS response would use a project milestone as the URL of the milestone. After refreshing the page the URL is correct so it did get assigned to the correct milestone, it's just the JS rendering that seems wrong.
Example Project
No example project available but the bug is present since v9.4.0 and still is present in v9.5.0.
What is the current bug behavior?
The rendered link links to a project milestone while it should be a group milestone when selecting a group milestone.
What is the expected correct behavior?
The rendered link links to a group milestone when selecting a group milestone.
Possible fixes
I'm guessing it goes wrong when serializing the Issues#update
JSON response. I'll update this ticket if I investigate it a little more and find out where it is. If possible I'll push a MR with a fix too.