Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
770ed0f8
Commit
770ed0f8
authored
Dec 01, 2017
by
Felipe Artur
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[CE-Backport] Fix board filter when milestone is predefined
parent
003a816a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
4 deletions
+12
-4
app/models/milestone.rb
app/models/milestone.rb
+7
-0
app/services/boards/issues/list_service.rb
app/services/boards/issues/list_service.rb
+5
-4
No files found.
app/models/milestone.rb
View file @
770ed0f8
...
@@ -84,6 +84,13 @@ class Milestone < ActiveRecord::Base
...
@@ -84,6 +84,13 @@ class Milestone < ActiveRecord::Base
else
milestones
.
active
else
milestones
.
active
end
end
end
end
def
predefined?
(
milestone
)
milestone
==
Any
||
milestone
==
None
||
milestone
==
Upcoming
||
milestone
==
Started
end
end
end
def
self
.
reference_prefix
def
self
.
reference_prefix
...
...
app/services/boards/issues/list_service.rb
View file @
770ed0f8
...
@@ -54,10 +54,11 @@ module Boards
...
@@ -54,10 +54,11 @@ module Boards
def
without_board_labels
(
issues
)
def
without_board_labels
(
issues
)
return
issues
unless
board_label_ids
.
any?
return
issues
unless
board_label_ids
.
any?
issues
.
where
.
not
(
issues
.
where
.
not
(
issues_label_links
.
limit
(
1
).
arel
.
exists
)
LabelLink
.
where
(
"label_links.target_type = 'Issue' AND label_links.target_id = issues.id"
)
end
.
where
(
label_id:
board_label_ids
).
limit
(
1
).
arel
.
exists
)
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
end
def
with_list_label
(
issues
)
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