Critical path not displayed when auto-scheduling is disabled

Hello,

I am using dhtmlx v7.1.4 PRO (angular and material skin).

In my projects, I show the critical path (gantt.config.highlight_critical_path).

When I’m on a project where my tasks are auto-scheduled (task.auto_scheduling = true), no problem, it works.

But as soon as I deactivate the autoschedule, if only for a single task, I no longer have a critical path displayed.

I don’t understand, yet it’s exactly the same project ( with the same dates).

To analyze I inspect the links (with gantt.getLinks()). On all my tasks the value of the “lag” field is 0. The critical path should therefore be displayed. But it’s not and I don’t understand why.

Does anyone have any idea what can happen with auto_scheduling disabled?

Thank you

Hello,

When you disable auto-scheduling for a particular task, it means that this task won’t be auto-scheduled if its predecessors change. So even if the task with the disabled auto_scheduling property is a critical task, its predecessors are not critical, because they don’t influence a non auto-scheduling task.
Please check the following snippet for better understanding:
https://snippet.dhtmlx.com/07ln36hv ;
When you click on the disable Task#3 AutoScheduling button, the task#3 will become a non auto-scheduling task, but remain the critical task and its predecessors will become non critical tasks which will not affect the end date of the project until they end later than the others