Defect #10048

Secondary sorting after sorting by parent task

Added by Jānis Elmeris over 5 years ago. Updated 8 months ago.

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

0%

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

Description

I've created a custom query with two sort orders: 1) Parent task - Ascending (as I want my subtasks be grouped visually together), 2) Updated - Descending (as I want to see the most recently changed tasks at the top).

What I would expect is that
  1. all the tasks without parents would be sorted by their "Updated" value;
  2. all the subtasks within the same parent task would be sorted by their "Updated" value.

As can be seen in the attached screenshot, the actual result in the example of "http://www.redmine.org/projects/redmine/issues" is all the non-parent tasks sorted by their IDs.

All the versions to be submitted along with a bug reports, please take from the current http://www.redmine.org installation, where I'm submitting the defect in. The test screenshot is taken from here.

redmine-sorting.png (78.5 KB) Jānis Elmeris, 2012-01-24 13:06


Related issues

Related to Redmine - Feature #7907: Display Issues in a hierarchy (tree) New 2011-03-17
Duplicated by Redmine - Defect #14432: Sorting issues with subtasks Closed
Duplicated by Redmine - Defect #20123: Can't sort by multiple fields when sorting by parent Closed

History

#1 Updated by Philip Reinders over 5 years ago

I am seeing the same problem. Sort of curious what is going on with this one as it is fairly critical for my implementation.

#2 Updated by Vitaly Klimov over 5 years ago

Please check my plugin - it solves this behavior:

http://www.redmine.org/plugins/redmine_smart_issues_sort

#3 Updated by Asaf H almost 5 years ago

+1
We have the same issue. It's problematic as I want to sort issues by priorities, but still have the subtasks grouped under their parent.

#4 Updated by John Pisani over 4 years ago

+1
Parent, Priority just ignores the latter.

#5 Updated by Dipan Mehta over 4 years ago

+1. This is indeed very essential to be in Redmine.

#6 Updated by Anton Potapov over 4 years ago

+1 vote for it

#7 Updated by Toshi MARUYAMA over 4 years ago

  • Duplicated by Defect #14432: Sorting issues with subtasks added

#8 Updated by Sergio Cambra about 4 years ago

+1 I have this problem too

#9 Updated by Zdravko Balorda about 4 years ago

Any news on this?
redmine_smart_issues_sort wouldn't run on 2.3, saying:
undefined method 'issues' for class 'Query'
on line 12 lib/query_patch.rb

Any clues are most appreciated.
Zdravko

#10 Updated by Nicolas Ph over 3 years ago

Well, i have the same issue, a custom query with "Parent task" as first sort field, the second field is ignored, whatever it is. The result look like the second field is set to 'Created'.

The same issue exists when sorting issue by clicking on columns : After adding the 'Parent Task' to the issue view, I click on "Updated" for example, and then on 'Parent Task', the previous 'Updated' order is completely lost.

By the way, the gantt view with the same query seems to work right.

#11 Updated by Toshi MARUYAMA over 2 years ago

  • Duplicated by Defect #20123: Can't sort by multiple fields when sorting by parent added

#12 Updated by Matt Brooke almost 2 years ago

+1 causing us a problem and the patch doesn't seem compatible with v 3.1

#13 Updated by Sebastian Paluch almost 2 years ago

+100

I'm getting more and more complains about this. We have thousands of issues per project organized in a tree structure and this defect is very, very painful.

#14 Updated by Josh Gitlin 8 months ago

+1, having the same issue, same use case. I would think this should be a simple fix... but I haven't looked at the code

Also available in: Atom PDF