summaryrefslogtreecommitdiffstats
path: root/app/models/version.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/version.rb')
-rw-r--r--app/models/version.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/version.rb b/app/models/version.rb
index bc0e17e22..f9b48fb11 100644
--- a/app/models/version.rb
+++ b/app/models/version.rb
@@ -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