diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2017-12-06 15:26:38 +0300 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2017-12-06 15:26:38 +0300 |
commit | 6836078304f8eb889c1d3324c4bcf04a1168afcd (patch) | |
tree | 9e71a33cad1801bf141a1308fba7b3dbe41e172b /app/services | |
parent | eb3672975a1f5c5570c565cd5a81fdd2228010ca (diff) | |
parent | 770ed0f8dc9b67061de144cee5ea6b920b707716 (diff) |
Merge branch 'ee-backport-issue_40654' into 'master'
[CE-Backport] Fix board filter when milestone is predefined
See merge request gitlab-org/gitlab-ce!15750
Diffstat (limited to 'app/services')
-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) |