summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2015-08-30 21:51:34 -0700
committerStan Hu <stanhu@gmail.com>2015-09-15 05:51:11 -0700
commitd3d03d1362e576d194782a655cdfe9bc6ed5c596 (patch)
tree0b720ea7ac0b5df7e968df83ce25d8e571617a56 /app/controllers
parent080a086d7644285af6cd4fb4b51c8f1c9b3aec95 (diff)
downloadgitlab-ce-d3d03d1362e576d194782a655cdfe9bc6ed5c596.tar.gz
Create a "destroyed Milestone" event and keep Milestone events around in the DB
for posterity. Also fix issue where destroying a Milestone would cause odd, transient messages like "created milestone" or "imported milestone". Add "in" preposition when creating and destroying milestones Closes #2382
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/projects/milestones_controller.rb7
1 files changed, 1 insertions, 6 deletions
diff --git a/app/controllers/projects/milestones_controller.rb b/app/controllers/projects/milestones_controller.rb
index 9efe9704d1e..86f4a02a6e9 100644
--- a/app/controllers/projects/milestones_controller.rb
+++ b/app/controllers/projects/milestones_controller.rb
@@ -66,12 +66,7 @@ class Projects::MilestonesController < Projects::ApplicationController
def destroy
return access_denied! unless can?(current_user, :admin_milestone, @project)
- update_params = { milestone: nil }
- @milestone.issues.each do |issue|
- Issues::UpdateService.new(@project, current_user, update_params).execute(issue)
- end
-
- @milestone.destroy
+ Milestones::DestroyService.new(project, current_user).execute(milestone)
respond_to do |format|
format.html { redirect_to namespace_project_milestones_path }