diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-10-05 14:06:34 -0300 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-10-11 11:39:04 -0300 |
commit | af87cf7c6ee1778b283ed285cdd7edbaaffc5fa5 (patch) | |
tree | 4724c6c3700c0939fdc4d96b4479422cb41ba991 /app/services/boards | |
parent | 9110746370c9759402af5087a612cbcfdf667c3c (diff) | |
download | gitlab-ce-af87cf7c6ee1778b283ed285cdd7edbaaffc5fa5.tar.gz |
Update Boards::Lists::GenerateService to generate for a specific board
Diffstat (limited to 'app/services/boards')
-rw-r--r-- | app/services/boards/lists/generate_service.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/services/boards/lists/generate_service.rb b/app/services/boards/lists/generate_service.rb index 830e386c98b..686e4e4b336 100644 --- a/app/services/boards/lists/generate_service.rb +++ b/app/services/boards/lists/generate_service.rb @@ -1,11 +1,11 @@ module Boards module Lists class GenerateService < Boards::BaseService - def execute + def execute(board) return false unless board.lists.movable.empty? List.transaction do - label_params.each { |params| create_list(params) } + label_params.each { |params| create_list(board, params) } end true @@ -13,9 +13,9 @@ module Boards private - def create_list(params) + def create_list(board, params) label = find_or_create_label(params) - Lists::CreateService.new(project, current_user, label_id: label.id).execute + Lists::CreateService.new(project, current_user, label_id: label.id).execute(board) end def find_or_create_label(params) |