301 |
301 |
def line_for_version(version, options)
|
302 |
302 |
# Skip versions that don't have a start_date
|
303 |
303 |
if version.is_a?(Version) && version.due_date && version.start_date
|
304 |
|
label = "#{h(version)} #{h(version.completed_percent.to_f.round)}%"
|
|
304 |
label = "#{h(version)} #{h(version.visible_fixed_issues.completed_percent.to_f.round)}%"
|
305 |
305 |
label = h("#{version.project} -") + label unless @project && @project == version.project
|
306 |
|
line(version.start_date, version.due_date, version.completed_percent, true, label, options, version)
|
|
306 |
line(version.start_date, version.due_date, version.visible_fixed_issues.completed_percent, true, label, options, version)
|
307 |
307 |
end
|
308 |
308 |
end
|
309 |
309 |
|
... | ... | |
678 |
678 |
html_class << (version.behind_schedule? ? 'version-behind-schedule' : '') << " "
|
679 |
679 |
html_class << (version.overdue? ? 'version-overdue' : '')
|
680 |
680 |
html_class << ' version-closed' unless version.open?
|
681 |
|
if version.start_date && version.due_date && version.completed_percent
|
|
681 |
if version.start_date && version.due_date && version.visible_fixed_issues.completed_percent
|
682 |
682 |
progress_date = calc_progress_date(version.start_date,
|
683 |
|
version.due_date, version.completed_percent)
|
|
683 |
version.due_date, version.visible_fixed_issues.completed_percent)
|
684 |
684 |
html_class << ' behind-start-date' if progress_date < self.date_from
|
685 |
685 |
html_class << ' over-end-date' if progress_date > self.date_to
|
686 |
686 |
end
|