Our state of the art Gantt chart


Post by miro »

Hi,

My root task has PercentDone = 75.12 % in database, but it is = 79 % when load on bryntum. please help me explain about this and how to fix it?

PercentDone.PNG
PercentDone.PNG (56.75 KiB) Viewed 332 times

Thanks.


Post by mats »

The parent task % done value is calculated based on its children, can you please provide a dataset we can look at?


Post by miro »

Hi Mats,

I knew the reason for this issue. because we have a place to update percent of specific task manually.

Could you please share the formula to calculate PercentDone in bryntum?


Post by arcady »

Parent percentDone = children_completed_duration / children_duration.
Where children_duration is sum of children duration field values.
And children_completed_duration is sum of children (percentDone * duration / 100).


Post by miro »

Thanks


Post by miro »

Hi,

I did use your formula to re-calculate PencentDone, but still difference a bit (PercentDone = 77.85 in database, = 79 in bryntum)

Do we have any condition that impact to formula? something like Milestone Task, Schedule Mode (Normal, Fixed Duration, Fixed Unit, Fixed Effort), etc.

Thanks


Post by arcady »

Yes there is a twist for milestones IIRC. Please check lib/Engine/quark/model/scheduler_pro/HasPercentDoneMixin.ts file code.
Namely the methods that will help you are calculatePercentDoneSummaryData and calculatePercentDone.


Post by miro »

Hi,

I got an issue very strange. Please take a look at the picture. all children tasks are the same but calculation to parent is difference.

PercentDone_2.PNG
PercentDone_2.PNG (70.14 KiB) Viewed 219 times

Note:

  • Number 1: data from database
  • Number 2: data loaded to bryntum
  • all children tasks of database and bryntum are the same but percent done of Parent tasks (TASK.00054) are difference. (Database = 82.56 %, Bryntum = 86 %)
Parent percentDone = children_completed_duration / children_duration.
Where children_duration is sum of children duration field values.
And children_completed_duration is sum of children (percentDone * duration / 100).

Based on your formula that you give me. I have:

- children_duration = SUM(Duration) = (16 + 1 + 161.5) = 178.5
- children_completed_duration  = SUM((PercentDone * Duration) / 100) = (100 * 16 / 100) + (100 * 1 / 100) + (80.72 * 161.5 / 100) = 16 + 1 + 130.3628 = 147.3628
=> PercentDone = children_completed_duration  / children_duration = 147.3628 / 178.5 * 100 = 82.56 %

I also attach test_data.json file. please help me check this.

Thanks

Attachments
test_data.json
(789.83 KiB) Downloaded 15 times

Post by arcady »

I don't know. Try debugging and see what happens? Check the tasks duration not in the column but in debugger (it could round the values).

I'm not following what you're try to achieve by comparing something that you calculate on the server w/ client side calculation..
If you want the value to be calculated on server - do it. Then client side calculation can be turned off https://www.bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#field-autoCalculatePercentDoneForParentTasks


Post by miro »

It's a 3.5% difference, so I am unsure how it could round the value has such a big gap. Unless it's a bug?


Post Reply