From 7681487af41e682e90ae1286b509ca699f1ad4e2 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 12 Aug 2007 10:23:07 +0000 Subject: [PATCH] Fixed: Roadmap percentages not being calculated correctly (Nick Read). The roadmap percentages are now calculated using floating point. git-svn-id: http://redmine.rubyforge.org/svn/trunk@608 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/projects/roadmap.rhtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/projects/roadmap.rhtml b/app/views/projects/roadmap.rhtml index 9a3ec685f..9deb6d20d 100644 --- a/app/views/projects/roadmap.rhtml +++ b/app/views/projects/roadmap.rhtml @@ -31,7 +31,7 @@ total = issues.size complete = issues.inject(0) {|c,i| i.status.is_closed? ? c + 1 : c } - percentComplete = total == 0 ? 100 : (100 / total * complete).floor + percentComplete = total == 0 ? 100 : (100.0 / total * complete).floor percentIncomplete = 100 - percentComplete %>