Hi
In some cases (depending on data) PercentDone attribute for parent nodes gets miscalculated.
It is most visible when all child nodes are 100% done but parent gets 99.9999999%.
also try to use
* calculatePercentDone() {
// for leaf tasks use "percentDone" field value as-is
const defaultValue = yield * super.calculatePercentDone();
debugger
if (this.percentDone > 99.99) {
return Math.round(this.percentDone);
}
return this.percentDone
// return Math.round(result);
}
but this not helping as its giving 0 for top parent project row.
Every time you convert a duration value expressed in days to some smaller unit it uses that ratio.
After using that ratio for Child 1 1 task 71 day duration will be calculated to 6131843999.999999 milliseconds. And this happens for all child tasks.
And then a summary task percentDone is calculated as: percentDone = childrenCompletedDuration / childrenTotalDuration
So we sum up all children float values of durations and divide them by another float value.
Providing a float ratio you get float values on every step ..so having a float result in the end is expected