diff options
Diffstat (limited to 'app/services/boards')
-rw-r--r-- | app/services/boards/issues/list_service.rb | 9 | ||||
-rw-r--r-- | app/services/boards/lists/list_service.rb | 6 |
2 files changed, 6 insertions, 9 deletions
diff --git a/app/services/boards/issues/list_service.rb b/app/services/boards/issues/list_service.rb index 9637eb1b918..e08509b84db 100644 --- a/app/services/boards/issues/list_service.rb +++ b/app/services/boards/issues/list_service.rb @@ -12,7 +12,7 @@ module Boards def execute return fetch_issues.order_closed_date_desc if list&.closed? - fetch_issues.order_by_position_and_priority(with_cte: can_attempt_search_optimization?) + fetch_issues.order_by_position_and_priority(with_cte: params[:search].present?) end # rubocop: disable CodeReuse/ActiveRecord @@ -91,7 +91,7 @@ module Boards end def set_attempt_search_optimizations - return unless can_attempt_search_optimization? + return unless params[:search].present? if board.group_board? params[:attempt_group_search_optimizations] = true @@ -130,11 +130,6 @@ module Boards def board_group board.group_board? ? parent : parent.group end - - def can_attempt_search_optimization? - params[:search].present? && - Feature.enabled?(:board_search_optimization, board_group, default_enabled: true) - end end end end diff --git a/app/services/boards/lists/list_service.rb b/app/services/boards/lists/list_service.rb index c96ea970943..07ce58b6851 100644 --- a/app/services/boards/lists/list_service.rb +++ b/app/services/boards/lists/list_service.rb @@ -3,8 +3,10 @@ module Boards module Lists class ListService < Boards::BaseService - def execute(board) - board.lists.create(list_type: :backlog) unless board.lists.backlog.exists? + def execute(board, create_default_lists: true) + if create_default_lists && !board.lists.backlog.exists? + board.lists.create(list_type: :backlog) + end board.lists.preload_associated_models end |