debian-mirror-gitlab/app/services/milestones/create_service.rb
2018-03-17 18:26:18 +05:30

13 lines
294 B
Ruby

module Milestones
class CreateService < Milestones::BaseService
def execute
milestone = parent.milestones.new(params)
if milestone.save && milestone.project_milestone?
event_service.open_milestone(milestone, current_user)
end
milestone
end
end
end