Fixed Version#issues_progress for Rails 3.1.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8986 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2012-02-25 00:07:09 +00:00
parent 30282f20da
commit f04c7a7680
1 changed files with 2 additions and 2 deletions

View File

@ -233,8 +233,8 @@ class Version < ActiveRecord::Base
ratio = open ? 'done_ratio' : 100
done = fixed_issues.sum("COALESCE(estimated_hours, #{estimated_average}) * #{ratio}",
:include => :status,
:conditions => ["is_closed = ?", !open]).to_f
:joins => :status,
:conditions => ["#{IssueStatus.table_name}.is_closed = ?", !open]).to_f
progress = done / (estimated_average * issues_count)
end
progress