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
8b8fbd4e
Commit
8b8fbd4e
authored
Oct 19, 2015
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename confusing methods
parent
aafb3661
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
issuable_finder.rb
app/finders/issuable_finder.rb
+4
-4
No files found.
app/finders/issuable_finder.rb
View file @
8b8fbd4e
...
...
@@ -93,7 +93,7 @@ class IssuableFinder
params
[
:milestone_title
].
present?
end
def
no_milestones
?
def
filter_by_no_milestone
?
milestones?
&&
params
[
:milestone_title
]
==
Milestone
::
None
.
title
end
...
...
@@ -114,7 +114,7 @@ class IssuableFinder
params
[
:label_name
].
present?
end
def
no_labels
?
def
filter_by_no_label
?
labels?
&&
params
[
:label_name
]
==
Label
::
None
.
title
end
...
...
@@ -227,7 +227,7 @@ class IssuableFinder
def
by_milestone
(
items
)
if
milestones?
if
no_milestones
?
if
filter_by_no_milestone
?
items
=
items
.
where
(
milestone_id:
[
-
1
,
nil
])
else
items
=
items
.
joins
(
:milestone
).
where
(
milestones:
{
title:
params
[
:milestone_title
]
})
...
...
@@ -243,7 +243,7 @@ class IssuableFinder
def
by_label
(
items
)
if
labels?
if
no_labels
?
if
filter_by_no_label
?
items
=
items
.
joins
(
"LEFT OUTER JOIN label_links ON label_links.target_type = '
#{
klass
.
name
}
' AND label_links.target_id =
#{
klass
.
table_name
}
.id"
).
where
(
label_links:
{
id:
nil
})
...
...
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