Project

General

Profile

Actions

Defect #15957

closed

Invalid calculation of %done of parent issues under certain ciscumstances

Added by Holger Just about 10 years ago. Updated about 10 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Issues
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
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).


Files

Actions #1

Updated by Jan from Planio www.plan.io about 10 years ago

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

Updated by Jean-Philippe Lang about 10 years ago

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

Same as #15870 fixed in 2.4.3.

Actions #3

Updated by Jean-Philippe Lang about 10 years ago

  • Target version deleted (Candidate for next minor release)
Actions

Also available in: Atom PDF