Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-10-04 23:41:00 +0300
committerPhil Hughes <me@iamphill.com>2016-10-06 13:00:01 +0300
commit97ec0c05f66e40a6de6620efcf5c92b7c2979f95 (patch)
tree526b5f675205be58ed0a0ac32a09af6cc250913b /app/services/boards/issues/create_service.rb
parente7a4bbb04a86259a569f6ac239ecb35ad36f39b5 (diff)
Add service to create a new issue in a board list
Diffstat (limited to 'app/services/boards/issues/create_service.rb')
-rw-r--r--app/services/boards/issues/create_service.rb16
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