Feature #3511

Ability to sort issues by grouped column

Added by Brad Mace over 8 years ago. Updated over 4 years ago.

Status:ClosedStart date:2009-06-18
Priority:LowDue date:
Assignee:Jean-Philippe Lang% Done:

0%

Category:Issues
Target version:2.2.0
Resolution:Fixed

Description

When grouping issues by a column, specifying a sort on that same column is ignored (should determine order of groups). Sorting within groups using other fields does work.

redmine_issue_versions_order.zip (1.34 KB) Stéphane Thomas, 2012-05-10 16:02


Related issues

Duplicated by Redmine - Defect #4901: Cannot change Target version order for issue filters if g... Closed 2010-02-23
Duplicated by Redmine - Defect #6131: Sort by Group By field does not work Closed 2010-08-13
Duplicated by Redmine - Feature #8252: Groups in a filter should be sortable Closed 2011-04-29

Associated revisions

Revision 10765
Added by Jean-Philippe Lang about 5 years ago

Ability to sort issues by grouped column (#3511).

History

#1 Updated by Vladimir Goryachev over 8 years ago

  • Assignee set to Jean-Philippe Lang

Yes, very ugly bug.
Please fix.

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

  • Assignee deleted (Jean-Philippe Lang)
  • Priority changed from Normal to Low

Please do not assign tickets to anyone.

#3 Updated by Paul McMillan over 8 years ago

+1

This issue also affects me.

#4 Updated by Kai Krakow almost 8 years ago

Please fix, still an issue in 0.9

#5 Updated by S Reid over 7 years ago

Just upgraded to 0.9, and found this problem. Is this scheduled to be fixed ?

#6 Updated by Ondrej Hrebicek over 7 years ago

Would love to see this fixed as well. Really makes the grouped view (when grouping by Version) impossible to use.

#7 Updated by Brian Lacy over 6 years ago

I just want to confirm that I'm still experiencing the same problem. Our most crucial report Groups by Target Version, and the default order is backwards! We have to scroll to the bottom of the report to see our most current Release. Very frustrating.

Redmine 1.0.4.stable.4552 (MySQL)

#8 Updated by S Reid over 6 years ago

Still an issue as of 1.1.1. Annoying when using group by target version, and have several pages of issues.

#9 Updated by Etienne Massip over 6 years ago

  • Target version set to Candidate for next major release

#10 Updated by Cyber Sprocket over 6 years ago

bump.

Group by target version is an issue on our larger projects. Newer target versions, that we add later in the cycle, are sorting to the stop of the group-by list. Thus the current/active release always are pushed down near the bottom.

Sorting by target version should either sort alpha-numeric ascending (so v01.10 would show up before v01.20) or even better would be to make the system sort by release date if target version is the grouping (much like road map & settings/versions).

#11 Updated by Etienne Massip about 6 years ago

  • Tracker changed from Defect to Feature

#12 Updated by Etienne Massip about 6 years ago

  • Subject changed from Can't sort issues by grouped column to Ability to sort issues by grouped column

#13 Updated by Stefan Lindner about 6 years ago

We too need a fix for this. Or, as it is a feature from now, we need this feature.

#14 Updated by Hans Jakobsen about 6 years ago

+1
This is an important feature, so you can view the full Issue list like a roadmap. Please give it high priority so it can be included soon.

#15 Updated by Alain V. about 6 years ago

+1
Quite important I think to have a nice view.

#16 Updated by Toggi Muppet about 6 years ago

+ 1
Annoying when using issues with customer that the highest version comes on top.

#17 Updated by Adam Sneller almost 6 years ago

+ 1
The nice thing about grouping issues by version is that the unassigned issues form a product backlog. It would be helpful if these groupings could be sorted so that the current sprint/version is first on the list.

#18 Updated by Stéphane Thomas over 5 years ago

+1

In the meantime, I've added the following patch in a new file config/initializers/versions.rb:

require 'app/models/query'

class Query < ActiveRecord::Base
  after_initialize :reset_versions_order

  # Updates the list of available columns to specify ascending as order for versions
  def reset_versions_order
    @@available_columns[10] = QueryColumn.new(:fixed_version, :sortable => ["#{Version.table_name}.effective_date", "#{Version.table_name}.name"], :default_order => 'asc', :groupable => true)
  end
end

But maybe you can think of a better way to update this list of columns (those are my very first lines of code in RoR)?

#19 Updated by Anonymous over 5 years ago

+1

#20 Updated by Nicola Bernardini over 5 years ago

+1

I tried the patch by Stèphane but it does not work for me... Or at least I don't know how to make it work...

#21 Updated by Simeon Fitch over 5 years ago

+1

Major efficiency impediment. Anyone have a temporary work around?

#22 Updated by Stéphane Thomas over 5 years ago

I've just updated to Redmine 1.4.1 and indeed my patch did not work any more. Here is a new one:

require 'app/models/query'

class Query < ActiveRecord::Base
  # Updates the list of available columns to specify ascending as order for versions
  def after_initialize
    @@available_columns[10] = QueryColumn.new(:fixed_version, :sortable => ["#{Version.table_name}.effective_date", "#{Version.table_name}.name"], :default_order => 'asc', :groupable => true)
  end
end

#23 Updated by Stéphane Thomas over 5 years ago

Since I've encountered some weird errors with this new patch when browsing issues, I did repackage it as a plugin. Enjoy!

#24 Updated by Rick Hunnicutt over 5 years ago

Great, thank you! Just unzip it in the plugin directory and restart redmine?

#25 Updated by Stéphane Thomas over 5 years ago

That's it, Rick!

#26 Updated by Rick Hunnicutt over 5 years ago

So, just to be clear, this plugin only changes the sort order of the Versions from descending to ascending. It doesn't add the ability to (re)sort the groups in any way.

#27 Updated by Anthony S over 5 years ago

In the description of this issue there is an attached file "redmine_issue_versions_order.zip"
How do I apply the patch in it? And does it work in 2.0?

#28 Updated by Jean-Philippe Lang over 5 years ago

  • Target version changed from Candidate for next major release to 2.2.0

#29 Updated by Jonathan Vargas about 5 years ago

+1. Please consider Stéphane patch but apply it to a more general use case when sorting group-by's

#30 Updated by Jean-Philippe Lang about 5 years ago

The sort order when grouping by version is fixed in 2.1.0, it's now ascending.

#31 Updated by Daniel Felix about 5 years ago

Jean-Philippe Lang wrote:

The sort order when grouping by version is fixed in 2.1.0, it's now ascending.

But currently there is no way to define (by click) a descending order on some grouped field, or?

#32 Updated by Jean-Philippe Lang about 5 years ago

  • Status changed from New to Closed
  • Assignee set to Jean-Philippe Lang
  • Resolution set to Fixed

Implemented in r10765. You can sort issues by the grouped column in order to display groups in reverse order.

#33 Updated by Jonathan Vargas about 5 years ago

Thanks!

#34 Updated by Daniel Felix about 5 years ago

Thanks. Just tested! Works for me. :-)

#35 Updated by Radhakrishna M over 4 years ago

Stéphane Thomas wrote:

+1

In the meantime, I've added the following patch in a new file config/initializers/versions.rb:

[...]

But maybe you can think of a better way to update this list of columns (those are my very first lines of code in RoR)?

Can we sort the Reports in user name order likewise? how to ?

Also available in: Atom PDF