Sorting by "More Weight" sorts incorrectly
Summary
On the issue page of a project, if the sort combo is changed to "More Weight", then the issues with the most weight do not show up first. The sort function should always sort "No weight" last regardless of the sort direction. Issues with "No weight" are not of interest when a weight-oriented sort is active.
"Less Weight" appears to work as expected, though, with "No Weight" sorting last.
Steps to reproduce
- Visit the issue page (https://gitlab.com/gitlab-org/gitlab-ee/issues)
- Change the sort combo to "More Weight"
- Note that the issues with the most weight do not appear first (those with no weight appear first)
Expected behavior
The highest (9) weights should appear first in the sorted list.
Actual behavior
The "no weight" issues appear first instead of the 9 weight issues.
Relevant logs and/or screenshots
Just try it on gitlab.com
Output of checks
Results of GitLab application Check
This happens on gitlab.com so you can assume the checks there are okay.
Results of GitLab environment info
This happens on gitlab.com so you can assume the checks there are okay.
Possible fixes
The sort function should always sort "No weight" last regardless of the sort direction. Issues with "No weight" are not of interest when a weight-oriented sort is active.