Commit 85ce9432 authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Fix saving of sort preference in group issues list

Save user sort preference from query parameters when vue_issues_list is
enabled.
parent 72310845
......@@ -218,6 +218,8 @@ class GroupsController < Groups::ApplicationController
@has_projects = group_projects.exists?
set_sort_order
respond_to do |format|
format.html
end
......
......@@ -509,6 +509,14 @@ RSpec.describe GroupsController, factory_default: :keep do
expect(assigns(:issues)).to eq([issue_1])
end
end
it 'saves the sort order to user preferences' do
stub_feature_flags(vue_issues_list: true)
get :issues, params: { id: group.to_param, sort: 'priority' }
expect(user.reload.user_preference.issues_sort).to eq('priority')
end
end
describe 'GET #merge_requests', :sidekiq_might_not_need_inline do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment