diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2013-05-17 22:59:39 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2013-05-17 22:59:39 +0000 |
commit | 6aa63659aa3ed0b192a1540239a3ab987ffd6c1c (patch) | |
tree | cad591d726a0690546e8b04d1e850be0efd3ba52 /lib | |
parent | c90bf645f51383ffb7bf2e3427b3e4c4672580f3 (diff) | |
download | redmine-6aa63659aa3ed0b192a1540239a3ab987ffd6c1c.tar.gz redmine-6aa63659aa3ed0b192a1540239a3ab987ffd6c1c.zip |
gantt: change sort method to class method (#7335)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11855 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib')
-rw-r--r-- | lib/redmine/helpers/gantt.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/redmine/helpers/gantt.rb b/lib/redmine/helpers/gantt.rb index f4c5d8ac0..7538c48dc 100644 --- a/lib/redmine/helpers/gantt.rb +++ b/lib/redmine/helpers/gantt.rb @@ -214,7 +214,7 @@ module Redmine @number_of_rows += 1 return if abort? issues = project_issues(project).select {|i| i.fixed_version.nil?} - sort_issues!(issues) + self.class.sort_issues!(issues) if issues render_issues(issues, options) return if abort? @@ -248,7 +248,7 @@ module Redmine return if abort? issues = version_issues(project, version) if issues - sort_issues!(issues) + self.class.sort_issues!(issues) # Indent issues options[:indent] += options[:indent_increment] render_issues(issues, options) @@ -676,12 +676,12 @@ module Redmine end # TODO: Sorts a collection of issues by start_date, due_date, id for gantt rendering - def sort_issues!(issues) + def self.sort_issues!(issues) issues.sort! { |a, b| gantt_issue_compare(a, b) } end # TODO: top level issues should be sorted by start date - def gantt_issue_compare(x, y) + def self.gantt_issue_compare(x, y) if x.root_id == y.root_id x.lft <=> y.lft else |