From d65bf4605e561b58d3bb8ddba0ffb335e3a4c768 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Tue, 10 Jun 2014 19:22:39 +0300 Subject: [PATCH] Fix milestone reopen Signed-off-by: Dmitriy Zaporozhets --- app/services/milestones/reopen_service.rb | 2 +- app/services/milestones/update_service.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/services/milestones/reopen_service.rb b/app/services/milestones/reopen_service.rb index ff1ba23bdb2..573f9ee5c21 100644 --- a/app/services/milestones/reopen_service.rb +++ b/app/services/milestones/reopen_service.rb @@ -1,7 +1,7 @@ module Milestones class ReopenService < Milestones::BaseService def execute(milestone) - if milestone.reopen + if milestone.activate event_service.reopen_milestone(milestone, current_user) end diff --git a/app/services/milestones/update_service.rb b/app/services/milestones/update_service.rb index 69254a79670..307e96a2b36 100644 --- a/app/services/milestones/update_service.rb +++ b/app/services/milestones/update_service.rb @@ -1,10 +1,10 @@ module Milestones class UpdateService < Milestones::BaseService def execute(milestone) - state = params.delete('state_event') + state = params.delete('state_event') || params.delete(:state_event) case state - when 'reopen' + when 'activate' Milestones::ReopenService.new(project, current_user, {}).execute(milestone) when 'close' Milestones::CloseService.new(project, current_user, {}).execute(milestone)