backlogs / redmine_backlogs

A Redmine plugin for agile teams
https://backlogs.github.io/www/
GNU General Public License v2.0
773 stars 460 forks source link

Sorting of releases in "Backlogs" tab #1064

Open Julius2342 opened 10 years ago

Julius2342 commented 10 years ago

For our needs it would be much more convenient to sort the releases by release_start_date ASC. The reason for this is that i refer to se upcoming releases on the top.

The quick and easy solution for us was patching line 176 in lib/backlogs_project_patch.rb from DESC to ASC.

has_many :releases, :class_name => 'RbRelease', :inverse_of => :project, :dependent => :destroy, :order => "#{RbRelease.table_name}.release_start_date DESC, #{RbRelease.table_name}.name DESC" 

I think it would be a good idea to sort the releases analogue to sprint_sort_order, e.g.:

order = Backlogs.setting[:sprint_sort_order] == 'desc' ? 'DESC' : 'ASC'
has_many :releases, :class_name => 'RbRelease', :inverse_of => :project, :dependent => :destroy, :order => "#{RbRelease.table_name}.release_start_date #{order}, #{RbRelease.table_name}.name #{order}" 

It might also be worth introducing a new configuration option (e.g. release sort order)

Blaless commented 9 years ago

I have the same issue.