Defect #15041

Issues list bad ordering by Subject

Added by Victor Sinceac about 4 years ago. Updated over 3 years ago.

Status:ReopenedStart date:
Priority:NormalDue date:
Assignee:Jean-Philippe Lang% Done:

0%

Category:Issues
Target version:-
Resolution:Invalid Affected version:

Description

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 *

Issues - Redmine 2013-10-04 11-35-46.png (61.9 KB) Victor Sinceac, 2013-10-04 13:39

Issues - Redmine 2013-10-14 06-17-50.png - Desc ordering, fist page (66.2 KB) Victor Sinceac, 2013-10-14 08:26

Issues - Redmine 2013-10-14 06-19-12.png - Desc ordering, last page (13.4 KB) Victor Sinceac, 2013-10-14 08:26

History

#1 Updated by Jean-Philippe Lang about 4 years ago

  • Status changed from New to Closed
  • Resolution set to Invalid

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.

#2 Updated by Mischa The Evil about 4 years ago

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.

#3 Updated by Victor Sinceac about 4 years ago

  • Status changed from Closed to Reopened

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...

#4 Updated by Victor Sinceac about 4 years ago

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?

#5 Updated by Victor Sinceac about 4 years ago

Desc ordering, fist page

#6 Updated by Victor Sinceac about 4 years ago

Desc ordering, last page

#7 Updated by Jean-Philippe Lang about 4 years ago

  • Assignee set to Jean-Philippe Lang

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.

#8 Updated by Stanislav German-Evtushenko over 3 years ago

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

#9 Updated by Stanislav German-Evtushenko over 3 years ago

Update: Redmine version is 2.5.1

Also available in: Atom PDF