Fix group milestone deletion
What does this MR do and why?
Group milestones fail to delete with an internal server error if a merge request is assigned to it.
The MergeRequests::BaseService
expects a projects as parameter.
The Milestones::DeleteService
however passed a group as the project parameter.
That caused a NoMethodError
since the @project
variable is not
being set in the BaseContainerService
because the passed container
is a group. That resulted in the project
attr_accessor returning nil.
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.
Screenshots or screen recordings
No UI changes
How to set up and validate locally
- Create a group
- Create a milestone in the group
- Create a project in the group
- Create a merge request in the project
- Assign the milestone to the merge request
- Delete the milestone and verify that it works
Related to #330428 (closed)