Tested with muon package manager 1.9.65 When Muon package manager is started, all available packages are listed in ascending alphabetical order, as indicated by caret sign (^) in column title "Packages". When search keyword is entered, package names are no longer sorted, but caret symbol is still there. Column title needs to be pressed to sort package names, but this click at the same time switches sorting to descending order. Next press shows correct ascending order. When new search keyword is entered, the same problem occurs. Sorting setting is not retained. Works correctly on "Status" or "Requested" columns, all searches appear sorted when entered. Reproducible: Always Steps to Reproduce: 1.Start Muon package manager 2.Enter any search keyword, results are not sorted 3.Change sorting to descending by clicking on column name "Package" 4. Enter different keyword, result are again not sorted Actual Results: By default every search result is not sorted, if sorting is set on package name. Expected Results: All results are sorted on package name.
Still present in 1.9.97, doesn't work sorting status as well (like, filter by origin and try to sort status to see which packages as upgradeable)
still present in 2.0.65
Still present in muon version 5.6.0 (Kubuntu Yakkety)
When the list is sorted by package name and you perform a search, the search results are sorted by relevance (whatever that means, according to xapian). The point seems to be that the search is performed also on description and not only on name (btw, you can use e.g. name:grub to search only by name). It's a feature, not a bug! ;) Another reason (documented in the code) is that this is the order returned by xapian (i.e. the library doing the actual search), and re-sorting the list is costly. Consider that the search can be repeated multiple times while you type, and every time we would have to sort the list. Need to take a deeper look at xapian to find a solution.
Well, if sorting after search is costly, maybe disable the column click so that the user doesn't get the impression that sorting is going to do anything useful
Git commit 63c63848589fc011d2fd39e36351d592d9bfab63 by Carlo Vanini. Committed on 01/02/2017 at 21:34. Pushed by vanini into branch 'master'. fix when sort indicator is shown in list header When starting a new search in the package list, and the list is sorted by name, then the results are sorted by relevancy and the indicator is hidden. Clicking on a column header changes the order wrt the selected column. Testing Done: Test 1 ------ * Click on 'Status' header * Search for 'fri' (gives meaningful result to see the order) * Result is sorted by status and then by name Test 2 ------ * Clear search string, click on 'Package' header * Search for 'fri' * Sort indicator is hidden, result is sorted by relevancy * Click on a header * Result is order by selected column, indicator is shown * Continue writing in search string, 'fritz' * Result is still ordered by column * Clearing search string and fill it again * Search result is sorted by relevancy REVIEW: 129904 M +8 -1 src/PackageModel/PackageProxyModel.cpp M +1 -0 src/PackageModel/PackageProxyModel.h M +25 -0 src/PackageModel/PackageViewHeader.cpp M +3 -0 src/PackageModel/PackageViewHeader.h M +2 -3 src/PackageModel/PackageWidget.cpp https://commits.kde.org/muon/63c63848589fc011d2fd39e36351d592d9bfab63