diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-01-19 08:35:59 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-01-19 08:35:59 +0000 |
commit | 6f1cda4852fdf04be23e77825ffcdb1a22b913a7 (patch) | |
tree | 8afbbf6b492bd0e246f1847516925c24b4c3bd6d | |
parent | 364b334d893b45b13953ce6acbda6cc771c97ae5 (diff) | |
download | redmine-6f1cda4852fdf04be23e77825ffcdb1a22b913a7.tar.gz redmine-6f1cda4852fdf04be23e77825ffcdb1a22b913a7.zip |
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
-rw-r--r-- | app/models/issue.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/issue.rb b/app/models/issue.rb index 6cfe97927..fec0568e3 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -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 |