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
Jérome Perrin
gitlab-ce
Commits
c3c92c73
Commit
c3c92c73
authored
Jan 22, 2016
by
Rubén Dávila
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make default sorting preference work for Issues and MRs.
parent
9ef46892
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
4 deletions
+16
-4
app/controllers/application_controller.rb
app/controllers/application_controller.rb
+2
-4
features/project/issues/issues.feature
features/project/issues/issues.feature
+7
-0
features/project/merge_requests.feature
features/project/merge_requests.feature
+7
-0
No files found.
app/controllers/application_controller.rb
View file @
c3c92c73
...
@@ -410,10 +410,8 @@ class ApplicationController < ActionController::Base
...
@@ -410,10 +410,8 @@ class ApplicationController < ActionController::Base
private
private
def
set_default_sort
def
set_default_sort
key
=
if
is_a_listing_page_for?
(
'issues'
)
key
=
if
is_a_listing_page_for?
(
'issues'
)
||
is_a_listing_page_for?
(
'merge_requests'
)
'issues_sort'
'issuable_sort'
elsif
is_a_listing_page_for?
(
'merge_requests'
)
'merge_requests_sort'
end
end
cookies
[
key
]
=
params
[
:sort
]
if
key
&&
params
[
:sort
].
present?
cookies
[
key
]
=
params
[
:sort
]
if
key
&&
params
[
:sort
].
present?
...
...
features/project/issues/issues.feature
View file @
c3c92c73
...
@@ -67,6 +67,13 @@ Feature: Project Issues
...
@@ -67,6 +67,13 @@ Feature: Project Issues
And
I visit project
"Shop"
issues page
And
I visit project
"Shop"
issues page
Then
The list should be sorted by
"Oldest updated"
Then
The list should be sorted by
"Oldest updated"
@javascript
Scenario
:
Visiting Merge Requests after being sorted the list
Given
I visit project
"Shop"
issues page
And
I sort the list by
"Oldest updated"
And
I visit project
"Shop"
merge requests page
Then
The list should be sorted by
"Oldest updated"
@javascript
@javascript
Scenario
:
Visiting Merge Requests from a differente Project after sorting
Scenario
:
Visiting Merge Requests from a differente Project after sorting
Given
I visit project
"Shop"
merge requests page
Given
I visit project
"Shop"
merge requests page
...
...
features/project/merge_requests.feature
View file @
c3c92c73
...
@@ -92,6 +92,13 @@ Feature: Project Merge Requests
...
@@ -92,6 +92,13 @@ Feature: Project Merge Requests
And
I visit project
"Shop"
merge requests page
And
I visit project
"Shop"
merge requests page
Then
The list should be sorted by
"Oldest updated"
Then
The list should be sorted by
"Oldest updated"
@javascript
Scenario
:
Visiting Issues after being sorted the list
Given
I visit project
"Shop"
merge requests page
And
I sort the list by
"Oldest updated"
And
I visit project
"Shop"
issues page
Then
The list should be sorted by
"Oldest updated"
@javascript
@javascript
Scenario
:
Visiting Merge Requests from a differente Project after sorting
Scenario
:
Visiting Merge Requests from a differente Project after sorting
Given
I visit project
"Shop"
merge requests page
Given
I visit project
"Shop"
merge requests page
...
...
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