diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-10-04 23:41:00 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2016-10-06 13:00:01 +0300 |
commit | 97ec0c05f66e40a6de6620efcf5c92b7c2979f95 (patch) | |
tree | 526b5f675205be58ed0a0ac32a09af6cc250913b /app/services | |
parent | e7a4bbb04a86259a569f6ac239ecb35ad36f39b5 (diff) |
Add service to create a new issue in a board list
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/boards/issues/create_service.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/app/services/boards/issues/create_service.rb b/app/services/boards/issues/create_service.rb new file mode 100644 index 00000000000..3701afd441f --- /dev/null +++ b/app/services/boards/issues/create_service.rb @@ -0,0 +1,16 @@ +module Boards + module Issues + class CreateService < Boards::BaseService + def execute(list) + params.merge!(label_ids: [list.label_id]) + create_issue + end + + private + + def create_issue + ::Issues::CreateService.new(project, current_user, params).execute + end + end + end +end |