The total slack and free slack shown Errors in value!

When I add FS relationship between task “P4 挖土” and task “2 设计” and set a waiting time of 5 hours on the relationship, the total Slack and Free Slack of task “P4 挖土” on the critical path become“ - 45“, but the two values should be 0! What is the wrong with it ?

Hello Yansen,
sorry for the delay. I’ve reproduced the bug with the calculation of total slack in a simple snippet https://snippet.dhtmlx.com/5/4e97c012f, but the result differs from that in your screenshot. As you see on my screenshot, the calculation of total slack is 0 but must be 4.
I sent it to our dev team and they will work on a fix. Unfortunately, I can’t give you any ETA.
It would help us a lot if you could reproduce the issue with a negative value in our snippet (you can modify my snippet and click “Share” to create a new link) so we could verify that both issues are solved when the solution is found.

Hello Yansen,

The dev team fixed the bug with the Total Slack calculation:
https://docs.dhtmlx.com/gantt/whatsnew.html#717

You can check how it works in the following sample:
https://docs.dhtmlx.com/gantt/samples/08_api/17_show_task_slack.html