diff options
author | Felipe Artur <felipefac@gmail.com> | 2017-12-01 17:08:38 -0200 |
---|---|---|
committer | Felipe Artur <felipefac@gmail.com> | 2017-12-05 15:34:31 -0200 |
commit | 770ed0f8dc9b67061de144cee5ea6b920b707716 (patch) | |
tree | 25975364cc2a2d0545cc0839863126c52ad76957 /app/services/boards | |
parent | 003a816afa885d56aa1eb4aadbad2b13b1baa25b (diff) | |
download | gitlab-ce-770ed0f8dc9b67061de144cee5ea6b920b707716.tar.gz |
[CE-Backport] Fix board filter when milestone is predefinedee-backport-issue_40654
Diffstat (limited to 'app/services/boards')
-rw-r--r-- | app/services/boards/issues/list_service.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/app/services/boards/issues/list_service.rb b/app/services/boards/issues/list_service.rb index d85d93e251b..6078fe38064 100644 --- a/app/services/boards/issues/list_service.rb +++ b/app/services/boards/issues/list_service.rb @@ -54,10 +54,11 @@ module Boards def without_board_labels(issues) return issues unless board_label_ids.any? - issues.where.not( - LabelLink.where("label_links.target_type = 'Issue' AND label_links.target_id = issues.id") - .where(label_id: board_label_ids).limit(1).arel.exists - ) + issues.where.not(issues_label_links.limit(1).arel.exists) + end + + def issues_label_links + LabelLink.where("label_links.target_type = 'Issue' AND label_links.target_id = issues.id").where(label_id: board_label_ids) end def with_list_label(issues) |