Make sure that we don't set the done ratio to a value > 100% (#15870).
git-svn-id: http://svn.redmine.org/redmine/trunk@12669 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
364b334d89
commit
6f1cda4852
|
@ -1364,6 +1364,7 @@ class Issue < ActiveRecord::Base
|
|||
"* (CASE WHEN is_closed = #{connection.quoted_true} THEN 100 ELSE COALESCE(done_ratio, 0) END)").to_f
|
||||
progress = done / (average * leaves_count)
|
||||
p.done_ratio = progress.round
|
||||
p.done_ratio = 100 if p.done_ratio > 100
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue