summaryrefslogtreecommitdiff
path: root/app/services/milestones/destroy_service.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/services/milestones/destroy_service.rb')
-rw-r--r--app/services/milestones/destroy_service.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/services/milestones/destroy_service.rb b/app/services/milestones/destroy_service.rb
index 7ce7d259d0b..2414966505b 100644
--- a/app/services/milestones/destroy_service.rb
+++ b/app/services/milestones/destroy_service.rb
@@ -4,10 +4,15 @@ module Milestones
Milestone.transaction do
update_params = { milestone: nil }
+
milestone.issues.each do |issue|
Issues::UpdateService.new(project, current_user, update_params).execute(issue)
end
+ milestone.merge_requests.each do |merge_request|
+ MergeRequests::UpdateService.new(project, current_user, update_params).execute(merge_request)
+ end
+
event_service.destroy_milestone(milestone, current_user)
Event.for_milestone_id(milestone.id).each do |event|