Project

General

Profile

Actions

Feature #3511

closed

Ability to sort issues by grouped column

Added by Brad Mace over 15 years ago. Updated over 11 years ago.

Status:
Closed
Priority:
Low
Category:
Issues
Target version:
Start date:
2009-06-18
Due date:
% Done:

0%

Estimated time:
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.


Files

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

Related issues

Has duplicate Redmine - Defect #4901: Cannot change Target version order for issue filters if grouped by versionClosed2010-02-23

Actions
Has duplicate Redmine - Defect #6131: Sort by Group By field does not workClosed2010-08-13

Actions
Has duplicate Redmine - Feature #8252: Groups in a filter should be sortableClosed2011-04-29

Actions
Actions #1

Updated by Vladimir Goryachev over 15 years ago

  • Assignee set to Jean-Philippe Lang

Yes, very ugly bug.
Please fix.

Actions #2

Updated by Jean-Philippe Lang over 15 years ago

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

Please do not assign tickets to anyone.

Actions #3

Updated by Paul McMillan over 15 years ago

+1

This issue also affects me.

Actions #4

Updated by Kai Krakow almost 15 years ago

Please fix, still an issue in 0.9

Actions #5

Updated by S Reid over 14 years ago

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

Actions #6

Updated by Ondrej Hrebicek over 14 years ago

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

Actions #7

Updated by Brian Lacy over 13 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)

Actions #8

Updated by S Reid over 13 years ago

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

Actions #9

Updated by Etienne Massip over 13 years ago

  • Target version set to Candidate for next major release
Actions #10

Updated by Cyber Sprocket over 13 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).

Actions #11

Updated by Etienne Massip over 13 years ago

  • Tracker changed from Defect to Feature
Actions #12

Updated by Etienne Massip over 13 years ago

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

Updated by Stefan Lindner about 13 years ago

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

Actions #14

Updated by Hans Jakobsen about 13 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.

Actions #15

Updated by Alain V. about 13 years ago

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

Actions #16

Updated by Toggi Muppet about 13 years ago

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

Actions #17

Updated by Adam Sneller almost 13 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.

Actions #18

Updated by Stéphane Thomas almost 13 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)?

Actions #19

Updated by Anonymous over 12 years ago

+1

Actions #20

Updated by Nicola Bernardini over 12 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...

Actions #21

Updated by Simeon Fitch over 12 years ago

+1

Major efficiency impediment. Anyone have a temporary work around?

Actions #22

Updated by Stéphane Thomas over 12 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
Actions #23

Updated by Stéphane Thomas over 12 years ago

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

Actions #24

Updated by Rick Hunnicutt over 12 years ago

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

Actions #25

Updated by Stéphane Thomas over 12 years ago

That's it, Rick!

Actions #26

Updated by Rick Hunnicutt over 12 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.

Actions #27

Updated by Anthony S over 12 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?

Actions #28

Updated by Jean-Philippe Lang over 12 years ago

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

Updated by Jonathan Vargas over 12 years ago

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

Actions #30

Updated by Jean-Philippe Lang over 12 years ago

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

Actions #31

Updated by Daniel Felix about 12 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?

Actions #32

Updated by Jean-Philippe Lang about 12 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.

Actions #33

Updated by Jonathan Vargas about 12 years ago

Thanks!

Actions #34

Updated by Daniel Felix about 12 years ago

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

Actions #35

Updated by Radhakrishna M over 11 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 ?

Actions

Also available in: Atom PDF