Fix milestone reopen

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
Dmitriy Zaporozhets 2014-06-10 19:22:39 +03:00
parent c4b02642d2
commit d65bf4605e
No known key found for this signature in database
GPG key ID: 627C5F589F467F17
2 changed files with 3 additions and 3 deletions

View file

@ -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

View file

@ -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)