gitlab-org--gitlab-foss/app/services/boards/issues/create_service.rb
Douglas Barbosa Alexandre 478b3d64f8 Remove Boards::BaseService
2016-10-11 11:39:05 -03:00

23 lines
487 B
Ruby

module Boards
module Issues
class CreateService < BaseService
def execute
create_issue(params.merge(label_ids: [list.label_id]))
end
private
def board
@board ||= project.boards.find(params.delete(:board_id))
end
def list
@list ||= board.lists.find(params.delete(:list_id))
end
def create_issue(params)
::Issues::CreateService.new(project, current_user, params).execute
end
end
end
end