Milestone link using "%" breaks when milestone renamed
Summary
When a Milestone is linked in a Gitlab text box or comment box using the shorthand %"MILESTONE_NAME", the automatic link generated for that milestone will break if and when that milestone is renamed. This is an important issue because it means that currently only the full URL to a milestone can be used in projects. If the shorthand of %"MILESTONE_NAME" is used, it becomes possible that a link to the milestone will disappear and it will no longer be possible to easily determine which milestone is being referenced in a comment. This has the potential to severely interrupt a project's ability to track development history and understand older comments.
Steps to reproduce
- Create a new milestone with any name (ex: New-Milestone)
- Link to that milestone in a Gitlab comment box with the shorthand %"New-Milestone" and add the comment
- The comment should show "New-Milestone" with a link to that milestone
- Rename New-Milestone to something else (ex: Renamed-Milestone)
- The comment will no longer have a link to that milestone since it has been renamed.
Example Project
What is the current bug behavior?
The link is not updated when a milestone is renamed.
What is the expected correct behavior?
The milestone link should update with the milestone name. Because Gitlab milestones URLs are not name dependent, the link itself should not be broken, so the comment should still be linked to the milestone.
Relevant logs and/or screenshots
Output of checks
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of: `sudo gitlab-rake gitlab:env:info`) (For installations from source run and paste the output of: `sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true
)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true
)(we will only investigate if the tests are passing)
Possible fixes
(If you can, link to the line of code that might be responsible for the problem)