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
Kazuhiko Shiozaki
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
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
app/finders/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
...
@@ -93,7 +93,7 @@ class IssuableFinder
params
[
:milestone_title
].
present?
params
[
:milestone_title
].
present?
end
end
def
no_milestones
?
def
filter_by_no_milestone
?
milestones?
&&
params
[
:milestone_title
]
==
Milestone
::
None
.
title
milestones?
&&
params
[
:milestone_title
]
==
Milestone
::
None
.
title
end
end
...
@@ -114,7 +114,7 @@ class IssuableFinder
...
@@ -114,7 +114,7 @@ class IssuableFinder
params
[
:label_name
].
present?
params
[
:label_name
].
present?
end
end
def
no_labels
?
def
filter_by_no_label
?
labels?
&&
params
[
:label_name
]
==
Label
::
None
.
title
labels?
&&
params
[
:label_name
]
==
Label
::
None
.
title
end
end
...
@@ -227,7 +227,7 @@ class IssuableFinder
...
@@ -227,7 +227,7 @@ class IssuableFinder
def
by_milestone
(
items
)
def
by_milestone
(
items
)
if
milestones?
if
milestones?
if
no_milestones
?
if
filter_by_no_milestone
?
items
=
items
.
where
(
milestone_id:
[
-
1
,
nil
])
items
=
items
.
where
(
milestone_id:
[
-
1
,
nil
])
else
else
items
=
items
.
joins
(
:milestone
).
where
(
milestones:
{
title:
params
[
:milestone_title
]
})
items
=
items
.
joins
(
:milestone
).
where
(
milestones:
{
title:
params
[
:milestone_title
]
})
...
@@ -243,7 +243,7 @@ class IssuableFinder
...
@@ -243,7 +243,7 @@ class IssuableFinder
def
by_label
(
items
)
def
by_label
(
items
)
if
labels?
if
labels?
if
no_labels
?
if
filter_by_no_label
?
items
=
items
.
items
=
items
.
joins
(
"LEFT OUTER JOIN label_links ON label_links.target_type = '
#{
klass
.
name
}
' AND label_links.target_id =
#{
klass
.
table_name
}
.id"
).
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
})
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