mirror of
https://github.com/redmine/redmine.git
synced 2024-09-09 22:25:56 +02:00
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
This commit is contained in:
parent
c4fee11969
commit
7681487af4
@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
total = issues.size
|
total = issues.size
|
||||||
complete = issues.inject(0) {|c,i| i.status.is_closed? ? c + 1 : c }
|
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
|
percentIncomplete = 100 - percentComplete
|
||||||
%>
|
%>
|
||||||
<table class="progress">
|
<table class="progress">
|
||||||
|
Loading…
Reference in New Issue
Block a user