BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
68360783
Commit
68360783
authored
Dec 06, 2017
by
Sean McGivern
Browse files
Options
Browse Files
Download
Plain 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
parents
eb367297
770ed0f8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
4 deletions
+12
-4
milestone.rb
app/models/milestone.rb
+7
-0
list_service.rb
app/services/boards/issues/list_service.rb
+5
-4
No files found.
app/models/milestone.rb
View file @
68360783
...
...
@@ -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
...
...
app/services/boards/issues/list_service.rb
View file @
68360783
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment