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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
f9115ff5
Commit
f9115ff5
authored
Dec 12, 2019
by
Jan Beckmann
Committed by
Thong Kuah
Dec 12, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix override of sort_direction_icon in ee sorting_helper
Fixes a special case for sorting by weight, closes #37067
parent
d47b3cd0
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
3 deletions
+24
-3
ee/app/helpers/ee/sorting_helper.rb
ee/app/helpers/ee/sorting_helper.rb
+3
-3
ee/changelogs/unreleased/37067-sort-direction-icon.yml
ee/changelogs/unreleased/37067-sort-direction-icon.yml
+5
-0
ee/spec/helpers/ee/sorting_helper_spec.rb
ee/spec/helpers/ee/sorting_helper_spec.rb
+16
-0
No files found.
ee/app/helpers/ee/sorting_helper.rb
View file @
f9115ff5
...
@@ -55,10 +55,10 @@ module EE
...
@@ -55,10 +55,10 @@ module EE
}.
merge
(
super
)
}.
merge
(
super
)
end
end
override
:
issuable_sort_icon_suffix
override
:
sort_direction_icon
def
issuable_sort_icon_suffix
(
sort_value
)
def
sort_direction_icon
(
sort_value
)
if
sort_value
==
sort_value_weight
if
sort_value
==
sort_value_weight
'lowest'
'
sort-
lowest'
else
else
super
super
end
end
...
...
ee/changelogs/unreleased/37067-sort-direction-icon.yml
0 → 100644
View file @
f9115ff5
---
title
:
Fix sort icon direction when sorting by weight
merge_request
:
21447
author
:
Jan Beckmann
type
:
fixed
ee/spec/helpers/ee/sorting_helper_spec.rb
0 → 100644
View file @
f9115ff5
# frozen_string_literal: true
require
'spec_helper'
describe
SortingHelper
do
describe
'#sort_direction_icon'
do
it
'returns lowest for weight'
do
expect
(
sort_direction_icon
(
'weight'
)).
to
eq
(
'sort-lowest'
)
end
it
'behaves like non-ee for other sort values'
do
expect
(
sort_direction_icon
(
'milestone'
)).
to
eq
(
'sort-lowest'
)
expect
(
sort_direction_icon
(
'last_joined'
)).
to
eq
(
'sort-highest'
)
end
end
end
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