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:
parent
30282f20da
commit
f04c7a7680
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue