提交 68360783 编写于 作者: S Sean McGivern

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
......@@ -84,6 +84,13 @@ class Milestone < ActiveRecord::Base
else milestones.active
end
end
def predefined?(milestone)
milestone == Any ||
milestone == None ||
milestone == Upcoming ||
milestone == Started
end
end
def self.reference_prefix
......
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册