@@ -454,7 +454,7 class Project < ActiveRecord::Base | |||
|
454 | 454 | [ |
|
455 | 455 | issues.minimum('start_date'), |
|
456 | 456 | shared_versions.collect(&:effective_date), |
|
457 |
shared_versions.collect |
|
|
457 | shared_versions.collect(&:start_date) | |
|
458 | 458 | ].flatten.compact.min |
|
459 | 459 | end |
|
460 | 460 |
@@ -43,7 +43,7 class Version < ActiveRecord::Base | |||
|
43 | 43 | end |
|
44 | 44 | |
|
45 | 45 | def start_date |
|
46 | effective_date | |
|
46 | @start_date ||= fixed_issues.minimum('start_date') | |
|
47 | 47 | end |
|
48 | 48 | |
|
49 | 49 | def due_date |
@@ -77,8 +77,7 class Version < ActiveRecord::Base | |||
|
77 | 77 | def behind_schedule? |
|
78 | 78 | if completed_pourcent == 100 |
|
79 | 79 | return false |
|
80 | elsif due_date && fixed_issues.present? && fixed_issues.minimum('start_date') # TODO: should use #start_date but that method is wrong... | |
|
81 | start_date = fixed_issues.minimum('start_date') | |
|
80 | elsif due_date && start_date | |
|
82 | 81 | done_date = start_date + ((due_date - start_date+1)* completed_pourcent/100).floor |
|
83 | 82 | return done_date <= Date.today |
|
84 | 83 | else |
@@ -319,7 +319,7 module Redmine | |||
|
319 | 319 | options[:zoom] ||= 1 |
|
320 | 320 | options[:g_width] ||= (self.date_to - self.date_from + 1) * options[:zoom] |
|
321 | 321 | |
|
322 |
coords = coordinates(version. |
|
|
322 | coords = coordinates(version.start_date, version.due_date, version.completed_pourcent, options[:zoom]) | |
|
323 | 323 | label = "#{h version } #{h version.completed_pourcent.to_i.to_s}%" |
|
324 | 324 | label = h("#{version.project} -") + label unless @project && @project == version.project |
|
325 | 325 |
General Comments 0
You need to be logged in to leave comments.
Login now