% Done is not correct for parent to parents when calculated from subtasks
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.
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.