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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
2d48fc0e
Commit
2d48fc0e
authored
Oct 27, 2018
by
Heinrich Lee Yu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rearrange code for readability
parent
085f3500
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
16 deletions
+18
-16
app/finders/issuable_finder.rb
app/finders/issuable_finder.rb
+18
-16
No files found.
app/finders/issuable_finder.rb
View file @
2d48fc0e
...
@@ -192,22 +192,6 @@ class IssuableFinder
...
@@ -192,22 +192,6 @@ class IssuableFinder
params
[
:milestone_title
].
present?
params
[
:milestone_title
].
present?
end
end
def
filter_by_no_milestone?
[
FILTER_NONE
,
Milestone
::
None
.
title
].
include?
(
params
[
:milestone_title
].
to_s
.
downcase
)
end
def
filter_by_any_milestone?
[
FILTER_ANY
,
Milestone
::
Any
.
title
].
include?
(
params
[
:milestone_title
].
to_s
.
downcase
)
end
def
filter_by_upcoming_milestone?
params
[
:milestone_title
]
==
Milestone
::
Upcoming
.
name
end
def
filter_by_started_milestone?
params
[
:milestone_title
]
==
Milestone
::
Started
.
name
end
def
milestones
def
milestones
return
@milestones
if
defined?
(
@milestones
)
return
@milestones
if
defined?
(
@milestones
)
...
@@ -465,6 +449,24 @@ class IssuableFinder
...
@@ -465,6 +449,24 @@ class IssuableFinder
end
end
# rubocop: enable CodeReuse/ActiveRecord
# rubocop: enable CodeReuse/ActiveRecord
def
filter_by_no_milestone?
# Accepts `No Milestone` for compatibility
params
[
:milestone_title
].
to_s
.
downcase
==
FILTER_NONE
||
params
[
:milestone_title
]
==
Milestone
::
None
.
title
end
def
filter_by_any_milestone?
# Accepts `Any Milestone` for compatibility
params
[
:milestone_title
].
to_s
.
downcase
==
FILTER_ANY
||
params
[
:milestone_title
]
==
Milestone
::
Any
.
title
end
def
filter_by_upcoming_milestone?
params
[
:milestone_title
]
==
Milestone
::
Upcoming
.
name
end
def
filter_by_started_milestone?
params
[
:milestone_title
]
==
Milestone
::
Started
.
name
end
def
by_label
(
items
)
def
by_label
(
items
)
return
items
unless
labels?
return
items
unless
labels?
...
...
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