Resolve "Sort by due date and popularity in both directions"
This commit is contained in:
parent
08d1cc5c2a
commit
0a89c08c05
3 changed files with 37 additions and 18 deletions
|
@ -142,7 +142,9 @@ module SortingHelper
|
||||||
{
|
{
|
||||||
sort_value_oldest_created => sort_value_created_date,
|
sort_value_oldest_created => sort_value_created_date,
|
||||||
sort_value_oldest_updated => sort_value_recently_updated,
|
sort_value_oldest_updated => sort_value_recently_updated,
|
||||||
sort_value_milestone_later => sort_value_milestone
|
sort_value_milestone_later => sort_value_milestone,
|
||||||
|
sort_value_due_date_later => sort_value_due_date,
|
||||||
|
sort_value_least_popular => sort_value_popularity
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -151,7 +153,11 @@ module SortingHelper
|
||||||
sort_value_created_date => sort_value_oldest_created,
|
sort_value_created_date => sort_value_oldest_created,
|
||||||
sort_value_recently_created => sort_value_oldest_created,
|
sort_value_recently_created => sort_value_oldest_created,
|
||||||
sort_value_recently_updated => sort_value_oldest_updated,
|
sort_value_recently_updated => sort_value_oldest_updated,
|
||||||
sort_value_milestone => sort_value_milestone_later
|
sort_value_milestone => sort_value_milestone_later,
|
||||||
|
sort_value_due_date => sort_value_due_date_later,
|
||||||
|
sort_value_due_date_soon => sort_value_due_date_later,
|
||||||
|
sort_value_popularity => sort_value_least_popular,
|
||||||
|
sort_value_most_popular => sort_value_least_popular
|
||||||
}.merge(issuable_sort_option_overrides)
|
}.merge(issuable_sort_option_overrides)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -420,6 +426,14 @@ module SortingHelper
|
||||||
'popularity'
|
'popularity'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def sort_value_most_popular
|
||||||
|
'popularity_desc'
|
||||||
|
end
|
||||||
|
|
||||||
|
def sort_value_least_popular
|
||||||
|
'popularity_asc'
|
||||||
|
end
|
||||||
|
|
||||||
def sort_value_priority
|
def sort_value_priority
|
||||||
'priority'
|
'priority'
|
||||||
end
|
end
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
title: Sort by due date and popularity in both directions for Issues and Merge requests
|
||||||
|
merge_request: 25502
|
||||||
|
author: Nermin Vehabovic
|
||||||
|
type: changed
|
|
@ -86,6 +86,7 @@ describe 'Sort Issuable List' do
|
||||||
expect(last_merge_request).to include(first_created_issuable.title)
|
expect(last_merge_request).to include(first_created_issuable.title)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
context 'custom sorting' do
|
context 'custom sorting' do
|
||||||
let(:issuable_type) { :merge_request }
|
let(:issuable_type) { :merge_request }
|
||||||
|
@ -108,7 +109,6 @@ describe 'Sort Issuable List' do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
context 'for issues' do
|
context 'for issues' do
|
||||||
include IssueHelpers
|
include IssueHelpers
|
||||||
|
|
Loading…
Reference in a new issue