Defect #6131

Sort by Group By field does not work

Added by Michalis Miatidis over 7 years ago. Updated over 6 years ago.

Status:ClosedStart date:2010-08-13
Priority:NormalDue date:
Assignee:-% Done:

0%

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

Description

as above...

Query.gif (9.47 KB) Michalis Miatidis, 2010-08-13 13:04

Result.gif (5.77 KB) Michalis Miatidis, 2010-08-13 13:05


Related issues

Duplicates Redmine - Feature #3511: Ability to sort issues by grouped column Closed 2009-06-18

History

#1 Updated by Felix Schäfer over 7 years ago

  • Status changed from New to Closed
  • Resolution set to Cant reproduce

Can't reproduce.

See SubmittingBugs.

#2 Updated by Michalis Miatidis over 7 years ago

  • File Query.gif added
  • Status changed from Closed to Reopened

Sorry, the following scenario in this site reproduces it:

the following query:

produces this result:

#3 Updated by Michalis Miatidis over 7 years ago

#4 Updated by Michalis Miatidis over 7 years ago

As if the sorting is made on some internal key?

#5 Updated by Felix Schäfer over 7 years ago

AFAIK versions are sorted by due date first, and names after that. Still no bug that I can see.

#6 Updated by Jean-Baptiste Barth over 7 years ago

In the screenshot, the groups are not sorted like expected (from a user point of view I mean, this may be a "standard" SQL behavior, I'm not sure). Group 1.1.0 is displayed before group 1.0.1, whereas Michalis asked for a sort by target version ascending.

#7 Updated by Felix Schäfer over 7 years ago

Ah, I think I know what's happening :-)

The "group by" and "sort by" don't influence each other. If you remove the "group by", the issues will be sorted correctly/as expected, if you specify a "group by", the issues inside the groups will be sorted correctly/as expected, but that won't influence the order of the groups. In the case where you select the same attribute to "group by" and "sort by", well, they are sorted "correctly" inside each group, though you don't see anything of it as they all have the same value for that attribute, rendering any sort of sorting moot.

#8 Updated by Jean-Baptiste Barth over 7 years ago

Do you think we should / could find a workaround ?

#9 Updated by Jean-Baptiste Barth over 7 years ago

OH: I just discovered you can "GROUP BY blah ASC" in at least sqlite and mysql. Needs to be tested, but we may have a clean workaround if it's supported on each of our databases and/or by rails adapters.

#10 Updated by Moritz Voss about 7 years ago

Jean-Baptiste Barth wrote:

OH: I just discovered you can "GROUP BY blah ASC" in at least sqlite and mysql. Needs to be tested, but we may have a clean workaround if it's supported on each of our databases and/or by rails adapters.

It'd be very intuitive to have it grouped, and even choose which way to group in another dropdown (just like the ordering in the other drop downs)

#11 Updated by Etienne Massip over 6 years ago

  • Status changed from Reopened to Closed
  • Resolution changed from Cant reproduce to Duplicate

Closed as duplicate of #3511.

Also available in: Atom PDF