Fix milestone reopen
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
parent
c4b02642d2
commit
d65bf4605e
2 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue