Defect #15957

Invalid calculation of %done of parent issues under certain ciscumstances

Added by Holger Just over 3 years ago. Updated over 3 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Issues
Target version:-
Resolution:Duplicate Affected version:

Description

One of our customers at Planio noticed a bug in the calculation of the %done field for parent issues.

With #14798, you updated the calculation of the done ration for certain edge cases, namely when the estimated_time of a child issue was explicitly set to 0. This patch however doesn't cover the whole issue and leads now to incorrect results (i.e. too large %done, sometimes even larger than 100) if there are closed issues of which some have set estimated_time to 0 and some to something larger.

The cause of the bug is the the calculation of the average doesn't handle estimated_time set to 0 and thus can produce a too small average which results in an overall too large result.

The attached patch fixes the issue and modifies the test to expose the bug. The bug affects all versions after r12131 (>= 2.3.3).

percent_done_in_parent_issues.diff Magnifier (1.63 KB) Holger Just, 2014-01-24 18:34

History

#1 Updated by Jan from Planio www.plan.io over 3 years ago

  • Status changed from New to Confirmed
  • Target version set to Candidate for next minor release

#2 Updated by Jean-Philippe Lang over 3 years ago

  • Status changed from Confirmed to Closed
  • Resolution set to Duplicate

Same as #15870 fixed in 2.4.3.

#3 Updated by Jean-Philippe Lang over 3 years ago

  • Target version deleted (Candidate for next minor release)

Also available in: Atom PDF