diff options
author | Stan Hu <stanhu@gmail.com> | 2015-09-17 08:04:37 +0000 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2015-09-17 08:04:37 +0000 |
commit | f4816372457c3b513f8707efd87ce34c9922177c (patch) | |
tree | 534be1d81e56da85514b88dd47fde25a7cf093f1 /app/controllers | |
parent | 2e9a7032cec02588484eb162717298d311770c7d (diff) | |
parent | d3d03d1362e576d194782a655cdfe9bc6ed5c596 (diff) | |
download | gitlab-ce-f4816372457c3b513f8707efd87ce34c9922177c.tar.gz |
Merge branch 'fix-issue-2382' into 'master'
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".
Now if a milestone is destroyed, at least it will indicate in the activity feed even if it's not clear which milestone was destroyed:
![image](https://gitlab.com/gitlab-org/gitlab-ce/uploads/c89cc8a0a9fa549deac433f17b890913/image.png)
Closes #2382
See merge request !1227
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/projects/milestones_controller.rb | 7 |
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 } |