Vote #74471
未完了Issues list bad ordering by Subject
0%
説明
Sorting the list by column Subject returns unexpected results.
Steps to reproduce:
- Display All Issues; by default the list is ordered by Subject;
- Click two times on the column Subject;
- The screen copy in attachments shows the bad ordering by Subject. The resulting order is as follows:
- Cy...
- ...some items not in [A-Z, a-z]...
- Se...
- Ye...
- Ya...
- XP
- XM...
- xm...
- Wr
journals
I guess you have a space before Cy... in the issue subject. If you edit the issue, you should see it.
Then you have non-alphabetic characters, that's OK.
The Se in not the start of the subjet (starts with [#2614]... but the line is wrapped)
Then you have alphabetic characters in ascending order.
--------------------------------------------------------------------------------
Jean-Philippe Lang wrote:
> I guess you have a space before Cy... in the issue subject. If you edit the issue, you should see it.
FTR: there actually isn't any space before it. See for yourself in the subject of #12161, since this is based on info from redmine.org. I actually can't see why this issue is placed there by sorting on subject.
--------------------------------------------------------------------------------
There is also a second bad sorting case in the same case study (see image in attachments): the order in the bottom part of the list is Y, X, W.
About the JPL comment on "space before Cy": if the system would let leading spaces in subject, then this should be another issue: leading spaces shall be trimmed for such a field...
--------------------------------------------------------------------------------
New case, raised by the request: http://www.redmine.org/projects/redmine/issues?sort=subject%2Cid%3Adesc
The page 1/164 shows A, C, E, H, j, N, s, ", which cannot be a "desc" ordering on the first page...
The same, for the last page (http://www.redmine.org/projects/redmine/issues?page=163&sort=subject%2Cid%3Adesc), one can see: ¶, A, C. Which cannot be a desc ordering on a last page.
Is this related somehow to the character encoding?
--------------------------------------------------------------------------------
Desc ordering, fist page
--------------------------------------------------------------------------------
Desc ordering, last page
--------------------------------------------------------------------------------
Oh, I did't even notice that it was on redmine.org!
There was no space before Cy... indeed but the C was not an ascii C (maybe some kind of cyrillic C?. I've replaced it with a regular C and it's now properly sorted.
> the order in the bottom part of the list is Y, X, W.
That's OK for a reverse ordering
> The page 1/164 shows A, C, E, H, j, N, s, ", which cannot be a "desc" ordering on the first page...
These ones had a leading space (I've checked it). I've removed the spaces and they are now properly sorted.
> The same, for the last page
This is also fixed.
The sort is done by the database, so it should be OK in most cases. But yes, issue subjects should be stripped automatically by Redmine.
--------------------------------------------------------------------------------
I've noticed that sorting by subject groups issues by parent tasks, for example:
|_.Subject (sorting)|_.Parent|
|task1|@#1@|
|task5|@#1@|
|task3|@#2@|
|task4|@#2@|
|task2|@#3@|
|task6|@#3@|
--------------------------------------------------------------------------------
Update: Redmine version is 2.5.1
--------------------------------------------------------------------------------