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
5e37d02d
Unverified
Commit
5e37d02d
authored
Apr 21, 2016
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove the `.distinct` when finding issues
This is not needed anymore after !3815. Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
d2bf73b7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
3 deletions
+14
-3
issuable_finder.rb
app/finders/issuable_finder.rb
+1
-3
issues_spec.rb
spec/features/issues_spec.rb
+13
-0
No files found.
app/finders/issuable_finder.rb
View file @
5e37d02d
...
...
@@ -278,9 +278,7 @@ class IssuableFinder
end
end
# When filtering by multiple labels we may end up duplicating issues (if one
# has multiple labels). This ensures we only return unique issues.
items
.
distinct
items
end
def
by_due_date
(
items
)
...
...
spec/features/issues_spec.rb
View file @
5e37d02d
...
...
@@ -178,6 +178,19 @@ describe 'Issues', feature: true do
expect
(
first_issue
).
to
include
(
'foo'
)
end
context
'with a filter on labels'
do
let
(
:label
)
{
create
(
:label
,
project:
project
)
}
before
{
create
(
:label_link
,
label:
label
,
target:
foo
)
}
it
'sorts by least recently due date by excluding nil due dates'
do
bar
.
update
(
due_date:
nil
)
visit
namespace_project_issues_path
(
project
.
namespace
,
project
,
label_names:
[
label
.
name
],
sort:
sort_value_due_date_later
)
expect
(
first_issue
).
to
include
(
'foo'
)
end
end
end
describe
'filtering by due date'
do
...
...
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