summaryrefslogtreecommitdiffstats
path: root/lib/redmine/helpers/gantt.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2017-11-29 19:38:44 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2017-11-29 19:38:44 +0000
commit62d6dfe1ccc1841ef97d9ed23b45086de78dafd1 (patch)
tree52ad8ac32a8d86c1b6928cb11cf550d50f1c6589 /lib/redmine/helpers/gantt.rb
parentd0b10af3ffbe5f88ea7e512d66a4f58c14684d21 (diff)
downloadredmine-62d6dfe1ccc1841ef97d9ed23b45086de78dafd1.tar.gz
redmine-62d6dfe1ccc1841ef97d9ed23b45086de78dafd1.zip
Fixes visibility checks for version.fixed_issues in Gantt (#27676).
Like the version page - the Gantt chart featured a "percent done" info for each version, which wasn't properly limited to visible issues. Patch by Gregor Schmidt. git-svn-id: http://svn.redmine.org/redmine/trunk@17053 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/redmine/helpers/gantt.rb')
-rw-r--r--lib/redmine/helpers/gantt.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/redmine/helpers/gantt.rb b/lib/redmine/helpers/gantt.rb
index b859c6c7d..c0b1f3148 100644
--- a/lib/redmine/helpers/gantt.rb
+++ b/lib/redmine/helpers/gantt.rb
@@ -301,9 +301,9 @@ module Redmine
def line_for_version(version, options)
# Skip versions that don't have a start_date
if version.is_a?(Version) && version.due_date && version.start_date
- label = "#{h(version)} #{h(version.completed_percent.to_f.round)}%"
+ label = "#{h(version)} #{h(version.visible_fixed_issues.completed_percent.to_f.round)}%"
label = h("#{version.project} -") + label unless @project && @project == version.project
- line(version.start_date, version.due_date, version.completed_percent, true, label, options, version)
+ line(version.start_date, version.due_date, version.visible_fixed_issues.completed_percent, true, label, options, version)
end
end
@@ -679,9 +679,9 @@ module Redmine
html_class << (version.behind_schedule? ? 'version-behind-schedule' : '') << " "
html_class << (version.overdue? ? 'version-overdue' : '')
html_class << ' version-closed' unless version.open?
- if version.start_date && version.due_date && version.completed_percent
+ if version.start_date && version.due_date && version.visible_fixed_issues.completed_percent
progress_date = calc_progress_date(version.start_date,
- version.due_date, version.completed_percent)
+ version.due_date, version.visible_fixed_issues.completed_percent)
html_class << ' behind-start-date' if progress_date < self.date_from
html_class << ' over-end-date' if progress_date > self.date_to
end