Project

General

Profile

Defect #1554

Wrong calculation of hours per storypoints

Added by Andreas Adelsberger almost 6 years ago.

Status:
New
Priority:
Normal
Category:
General stats
Target version:
-
Source:
Development
Detected on version:
Blocked:
No
Alone:
No
Milestones:
Sprint:

Description

Hi, hours per story points are calculated as a sum of the child tasks. Hours on the issue directly are not added. So if hours are tracked on the user story direclty the calculation is wrong.

How about simply adding them like this:

diff --git a/lib/scrum/issue_patch.rb b/lib/scrum/issue_patch.rb
index f20e2ce..6506dce 100644
--- a/lib/scrum/issue_patch.rb
+++ b/lib/scrum/issue_patch.rb
@@ -320,7 +320,7 @@ module Scrum
         def total_time
           if self.is_pbi?
             the_pending_effort = self.pending_effort_children
-            the_spent_hours = self.children.collect{|task| task.spent_hours}.compact.sum
+            the_spent_hours = self.spent_hours + self.children.collect{|task| task.spent_hours}.compact.sum
           elsif self.is_task?
             the_pending_effort = self.pending_effort
             the_spent_hours = self.spent_hours

This works in my case

Best regards,

No data to display

Also available in: Atom PDF