Actions
Defect #44667
openSort order of a saved query is lost when going back to the issue list, and ignored by the previous/next links
Status:
New
Priority:
Normal
Assignee:
-
Category:
Issues filter
Target version:
-
Resolution:
Affected version:
Description
When a saved query is sorted by clicking on a column header, the sort order is stored in the session (session[:issue_query][:sort]), but it is only read back for unsaved queries. With a saved query:
- After going back to the issue list from an issue (e.g. with the "Issues" tab), the list is sorted by the default sort order of the query again.
- The Previous/Next links and the "x of y" counter on the issue page use the default sort order of the query, not the order of the list the issue was opened from.
- The "x of y" link opens the query with its default sort order. The page number, which is calculated from the position in the sorted list, can point to the wrong page.
Steps to reproduce:
- Create a saved query sorted by
#ascending. - Select the query and sort the list by
#descending by clicking on the column header. - Open an issue: "Next" goes to the issue with the next higher ID instead of the next lower one.
- Click on the "Issues" tab: the list is sorted by
#ascending again.
Expected: the list, the Previous/Next links and the "x of y" link use the sort order selected in step 2, until another query is selected from the sidebar.
This was found while working on #44406.
Files
Actions