debian-mirror-gitlab/app/services/milestones/create_service.rb

14 lines
294 B
Ruby
Raw Normal View History

2014-09-02 18:07:02 +05:30
module Milestones
class CreateService < Milestones::BaseService
def execute
2017-09-10 17:25:29 +05:30
milestone = parent.milestones.new(params)
2014-09-02 18:07:02 +05:30
2018-03-17 18:26:18 +05:30
if milestone.save && milestone.project_milestone?
2014-09-02 18:07:02 +05:30
event_service.open_milestone(milestone, current_user)
end
milestone
end
end
end