Defect #20123

Can't sort by multiple fields when sorting by parent

Added by Sebastian Paluch over 2 years ago. Updated over 2 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Issues
Target version:-
Resolution:Duplicate Affected version:3.0.1

Description

It seems that the issue sort order set when creating custom query does not work when "Parent task" is involved.
Take a look on attached query screen shoot. It is a query that sorts first by "Parent task" to show hierarchy and then by "Update" field. The marked issues 21047 and 21069 have the same parent as others but much older date and should be listed at the end.

Also the change introduced in #2871 does not seem to work.

Environment:
  Redmine version                3.0.1.stable
  Ruby version                   2.0.0-p594 (2014-10-27) [i386-mingw32]
  Rails version                  4.2.0
  Environment                    production
  Database adapter               Mysql2
SCM:
  Subversion                     1.8.11
  Git                            1.9.5
  Filesystem                     
Redmine plugins:
  inside_avatar                  1.0.2
  parent_issue_filter            1.0.1
  redmine_agile                  1.3.8
  redmine_spent_time_column      2.1.0
  redmine_version_fixed_issues   1.0.0
  sidebar_hide                   0.0.7

sort order.png (112 KB) Sebastian Paluch, 2015-06-18 08:48


Related issues

Duplicates Redmine - Defect #10048: Secondary sorting after sorting by parent task New

History

#1 Updated by Jean-Philippe Lang over 2 years ago

  • Subject changed from Issue sort by multiple fields is broken to Can't sort by multiple fields when sorting by parent
  • Status changed from New to Confirmed

Indeed. As far as I know there's no easy fix for this due to how sorting by parent works. Children have different lft values so the second order sort is never used.

#2 Updated by Sebastian Paluch over 2 years ago

This is important feature, we use hierarchy even more heavily and correct issues sorting is the key for good presentation/visibility.

This is duplicating #10048.

#3 Updated by Sebastian Paluch over 2 years ago

Can the solution be ported from plugin mentioned in #10048#note-2?

The plugin is out of date and the issue is actually a Redmine core issue and would be good to fix it there instead in plugin.

#4 Updated by Toshi MARUYAMA over 2 years ago

  • Status changed from Confirmed to Closed
  • Resolution set to Duplicate

Sebastian Paluch wrote:

This is duplicating #10048.

Indeed.

#5 Updated by Toshi MARUYAMA over 2 years ago

  • Duplicates Defect #10048: Secondary sorting after sorting by parent task added

Also available in: Atom PDF