Defect #24213
closed% Done is not correct for parent to parents when calculated from subtasks
0%
Description
When having more than two levels of issues then when the % done is calculated for the top level parent then the subtasks on the first level always have equal weight instead of having a weight based on their total estimated hours.
Example:
P - top level parent task (40) = total estimated time / \ / \ A1 B1 - 1st level subtasks (10) (30) = total estimated time |\ |\ | \ | \ A2 A3 B2 B3 - 2nd level subtasks 3 7 9 21 = estimated times for 2nd level subtasks
The 2nd level subtasks each have an estimated time (A2=3h, A3=7h, B2=9h, B3=21h). The A subtree has a total of 10h and the B subtree has a total of 30h.
The 1st level subtasks calculate their % done using (sum of subtasks % done * estimated time)/(total estimated time).
So if A2 is closed(100%) then A1 has a done of 30 (A2+A3=10h, and 3h of 10h = 30%).
The total estimated time for the top level parent P is 40h. When only A2 is closed then the correct done for P should be 7.5 (3h of 40h), but it is actually showing the done for A1 divided by the total number of 1st level subtasks which is 30/2=15%.
I have created a patch that solves the problem, and it seems to work fine for us that have up to three levels of tasks and no more than 10 nodes total in a tree.
Files
Related issues
Updated by Toshi MARUYAMA almost 8 years ago
- Status changed from New to Needs feedback
Updated by C-O L almost 8 years ago
Yes #23511 should fix this problem, sorry I didn't find that issue before posting.
Updated by Toshi MARUYAMA over 7 years ago
- Status changed from Needs feedback to Closed
- Resolution set to Duplicate
Updated by Toshi MARUYAMA over 7 years ago
- Is duplicate of Defect #23511: Progress of parent task should be calculated using total estimated hours of children added