Commit d65bf460 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Fix milestone reopen

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent c4b02642
module Milestones module Milestones
class ReopenService < Milestones::BaseService class ReopenService < Milestones::BaseService
def execute(milestone) def execute(milestone)
if milestone.reopen if milestone.activate
event_service.reopen_milestone(milestone, current_user) event_service.reopen_milestone(milestone, current_user)
end end
......
module Milestones module Milestones
class UpdateService < Milestones::BaseService class UpdateService < Milestones::BaseService
def execute(milestone) def execute(milestone)
state = params.delete('state_event') state = params.delete('state_event') || params.delete(:state_event)
case state case state
when 'reopen' when 'activate'
Milestones::ReopenService.new(project, current_user, {}).execute(milestone) Milestones::ReopenService.new(project, current_user, {}).execute(milestone)
when 'close' when 'close'
Milestones::CloseService.new(project, current_user, {}).execute(milestone) Milestones::CloseService.new(project, current_user, {}).execute(milestone)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment