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
Tatuya Kamada
gitlab-ce
Commits
45e516b8
Commit
45e516b8
authored
May 06, 2016
by
Felipe Artur
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bug when ordering by milestone due date and filtering by milestone
parent
3b2223f1
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
4 deletions
+0
-4
app/models/concerns/issuable.rb
app/models/concerns/issuable.rb
+0
-1
spec/features/issues_spec.rb
spec/features/issues_spec.rb
+0
-2
spec/models/concerns/issuable_spec.rb
spec/models/concerns/issuable_spec.rb
+0
-1
No files found.
app/models/concerns/issuable.rb
View file @
45e516b8
...
@@ -44,7 +44,6 @@ module Issuable
...
@@ -44,7 +44,6 @@ module Issuable
scope
:join_project
,
->
{
joins
(
:project
)
}
scope
:join_project
,
->
{
joins
(
:project
)
}
scope
:references_project
,
->
{
references
(
:project
)
}
scope
:references_project
,
->
{
references
(
:project
)
}
scope
:non_archived
,
->
{
join_project
.
where
(
projects:
{
archived:
false
})
}
scope
:non_archived
,
->
{
join_project
.
where
(
projects:
{
archived:
false
})
}
scope
:outer_join_milestone
,
->
{
joins
(
"LEFT OUTER JOIN milestones ON milestones.id =
#{
table_name
}
.milestone_id"
)
}
delegate
:name
,
delegate
:name
,
:email
,
:email
,
...
...
spec/features/issues_spec.rb
View file @
45e516b8
...
@@ -185,14 +185,12 @@ describe 'Issues', feature: true do
...
@@ -185,14 +185,12 @@ describe 'Issues', feature: true do
visit
namespace_project_issues_path
(
project
.
namespace
,
project
,
sort:
sort_value_recently_created
)
visit
namespace_project_issues_path
(
project
.
namespace
,
project
,
sort:
sort_value_recently_created
)
expect
(
first_issue
).
to
include
(
'baz'
)
expect
(
first_issue
).
to
include
(
'baz'
)
expect
(
last_issue
).
to
include
(
'foo'
)
end
end
it
'sorts by oldest'
do
it
'sorts by oldest'
do
visit
namespace_project_issues_path
(
project
.
namespace
,
project
,
sort:
sort_value_oldest_created
)
visit
namespace_project_issues_path
(
project
.
namespace
,
project
,
sort:
sort_value_oldest_created
)
expect
(
first_issue
).
to
include
(
'foo'
)
expect
(
first_issue
).
to
include
(
'foo'
)
expect
(
last_issue
).
to
include
(
'baz'
)
end
end
it
'sorts by most recently updated'
do
it
'sorts by most recently updated'
do
...
...
spec/models/concerns/issuable_spec.rb
View file @
45e516b8
...
@@ -130,7 +130,6 @@ describe Issue, "Issuable" do
...
@@ -130,7 +130,6 @@ describe Issue, "Issuable" do
let!
(
:issue2
)
{
create
(
:issue
,
project:
project
,
milestone:
late_milestone
)
}
let!
(
:issue2
)
{
create
(
:issue
,
project:
project
,
milestone:
late_milestone
)
}
let!
(
:issue3
)
{
create
(
:issue
,
project:
project
)
}
let!
(
:issue3
)
{
create
(
:issue
,
project:
project
)
}
it
"sorts desc"
do
it
"sorts desc"
do
issues
=
project
.
issues
.
sort
(
'milestone_due_desc'
)
issues
=
project
.
issues
.
sort
(
'milestone_due_desc'
)
expect
(
issues
).
to
match_array
([
issue2
,
issue1
,
issue
,
issue3
])
expect
(
issues
).
to
match_array
([
issue2
,
issue1
,
issue
,
issue3
])
...
...
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