diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-11-27 22:16:33 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-11-27 22:16:33 +0000 |
commit | c3817e620f0584fe193aab4310b35e3dfd67536c (patch) | |
tree | 773f4c8f470f73bdc0135475e02478cb4c0b7c0f /app | |
parent | 9a270c46c0aa3fbfd799a38122b115878840e5d8 (diff) | |
download | redmine-c3817e620f0584fe193aab4310b35e3dfd67536c.tar.gz redmine-c3817e620f0584fe193aab4310b35e3dfd67536c.zip |
Code cleanup.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10888 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r-- | app/models/version.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/app/models/version.rb b/app/models/version.rb index 212ce851d..dbcd317e9 100644 --- a/app/models/version.rb +++ b/app/models/version.rb @@ -269,9 +269,7 @@ class Version < ActiveRecord::Base if issues_count > 0 ratio = open ? 'done_ratio' : 100 - done = fixed_issues.sum("COALESCE(estimated_hours, #{estimated_average}) * #{ratio}", - :joins => :status, - :conditions => ["#{IssueStatus.table_name}.is_closed = ?", !open]).to_f + done = fixed_issues.open(open).sum("COALESCE(estimated_hours, #{estimated_average}) * #{ratio}").to_f progress = done / (estimated_average * issues_count) end progress |