Fixes calculation of version estimated hours with subtasks (#5265).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3633 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2010-04-11 13:20:02 +00:00
parent 5879273739
commit 71a4158fd0
2 changed files with 30 additions and 1 deletions
+2 -1
View File
@@ -52,8 +52,9 @@ class Version < ActiveRecord::Base
end
# Returns the total estimated time for this version
# (sum of leaves estimated_hours)
def estimated_hours
@estimated_hours ||= fixed_issues.sum(:estimated_hours).to_f
@estimated_hours ||= fixed_issues.leaves.sum(:estimated_hours).to_f
end
# Returns the total reported time for this version