Redmineのガントチャートのソートを直す一行パッチ

Redmineガントチャートってどうしてあの並びなんでしょうね?
直感的には上から順にバージョンの日付で並べたい!


というわけで、「バージョン」タブと同じように
バージョンの完了日付でソートするための一行パッチ。

--- lib/redmine/helpers/gantt.rb.org
+++ lib/redmine/helpers/gantt.rb
@@ -164,5 +164,5 @@
       # Returns the distinct versions of the issues that belong to +project+
       def project_versions(project)
-        project_issues(project).collect(&:fixed_version).compact.uniq
+        project_issues(project).collect(&:fixed_version).compact.uniq.sort
       end


Redmine1.4系と2.0系はこんな感じでOKです。


※参考
https://groups.google.com/forum/#!topic/redmine-users-ja/KnaFt22eRG0