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
Léo-Paul Géneau
gitlab-ce
Commits
b4550139
Commit
b4550139
authored
Nov 14, 2018
by
Jacopo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix default sorting for subgroups and projects list
parent
28e3a90b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
1 deletion
+13
-1
app/finders/group_descendants_finder.rb
app/finders/group_descendants_finder.rb
+1
-1
changelogs/unreleased/53290-incorrect-project-list-order-select-default-label.yml
...290-incorrect-project-list-order-select-default-label.yml
+5
-0
spec/finders/group_descendants_finder_spec.rb
spec/finders/group_descendants_finder_spec.rb
+7
-0
No files found.
app/finders/group_descendants_finder.rb
View file @
b4550139
...
...
@@ -178,7 +178,7 @@ class GroupDescendantsFinder
end
def
sort
params
.
fetch
(
:sort
,
'
id_a
sc'
)
params
.
fetch
(
:sort
,
'
created_de
sc'
)
end
# rubocop: disable CodeReuse/ActiveRecord
...
...
changelogs/unreleased/53290-incorrect-project-list-order-select-default-label.yml
0 → 100644
View file @
b4550139
---
title
:
Fix default sorting for subgroups and projects list
merge_request
:
23058
author
:
Jacopo Beschi @jacopo-beschi
type
:
fixed
spec/finders/group_descendants_finder_spec.rb
View file @
b4550139
...
...
@@ -74,6 +74,13 @@ describe GroupDescendantsFinder do
end
end
it
'sorts elements by latest created as default'
do
project1
=
create
(
:project
,
namespace:
group
,
created_at:
1
.
hour
.
ago
)
project2
=
create
(
:project
,
namespace:
group
)
expect
(
subject
.
execute
).
to
eq
([
project2
,
project1
])
end
context
'sorting by name'
do
let!
(
:project1
)
{
create
(
:project
,
namespace:
group
,
name:
'a'
,
path:
'project-a'
)
}
let!
(
:project2
)
{
create
(
:project
,
namespace:
group
,
name:
'z'
,
path:
'project-z'
)
}
...
...
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