From 2663ae66ae28ed65289e869946d4d9f67c36d34b Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Thu, 20 Jun 2019 06:29:11 +0000 Subject: Roadmap shows 100%, but one of its tasks is still set to 90% (#30949). Patch by Bernhard Rohloff. git-svn-id: http://svn.redmine.org/redmine/trunk@18265 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/helpers/application_helper.rb | 2 +- app/views/versions/_overview.html.erb | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 6b4ac3041..4ecb558b5 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1376,7 +1376,7 @@ module ApplicationHelper def progress_bar(pcts, options={}) pcts = [pcts, pcts] unless pcts.is_a?(Array) - pcts = pcts.collect(&:round) + pcts = pcts.collect(&:floor) pcts[1] = pcts[1] - pcts[0] pcts << (100 - pcts[1] - pcts[0]) titles = options[:titles].to_a diff --git a/app/views/versions/_overview.html.erb b/app/views/versions/_overview.html.erb index 21224df43..48c6b5972 100644 --- a/app/views/versions/_overview.html.erb +++ b/app/views/versions/_overview.html.erb @@ -17,9 +17,9 @@ <% if version.visible_fixed_issues.count > 0 %> <%= progress_bar([version.visible_fixed_issues.closed_percent, version.visible_fixed_issues.completed_percent], :titles => - ["%s: %0.0f%%" % [l(:label_closed_issues_plural), version.visible_fixed_issues.closed_percent], - "%s: %0.0f%%" % [l(:field_done_ratio), version.visible_fixed_issues.completed_percent]], - :legend => ('%0.0f%%' % version.visible_fixed_issues.completed_percent)) %> + ["%s: %i%%" % [l(:label_closed_issues_plural), version.visible_fixed_issues.closed_percent], + "%s: %i%%" % [l(:field_done_ratio), version.visible_fixed_issues.completed_percent]], + :legend => ('%i%%' % version.visible_fixed_issues.completed_percent)) %>

<%= link_to(l(:label_x_issues, :count => version.visible_fixed_issues.count), version_filtered_issues_path(version, :status_id => '*')) %> -- cgit v1.2.3