Our state of the art Gantt chart


Post by beotech »

We regularly see JS errors like the one below when loading projects :

JS error.PNG
JS error.PNG (15.71 KiB) Viewed 334 times

Here it is a pred/succ link that cannot be applied because of constraint dates positionned on the tasks.

Most of the time it is due to some constraints that are not valid, which results in the scheduling engine being instable, throwing JS errors and making it impossible to display all the tasks, not to mention edit them.

Invalid constraints can happen very quickly with various scenarii such as for example:

  • a task has been modified individually in another module without using your scheduling engine

  • some days off have been later added to a resource assigned to a task and intersect with the tasks dates

  • a project is being migrated from another system that was using another scheduling engine

  • etc...

All these scenarii lead to the problems mentionned at the beginning of this post and it is very difficult to find which constraints are invalid, especially when you have hundred of tasks.

Ideally, instead of just crashing the module, it would be far better to automatically adapt or remove the invalid constraints, display some notification about the changes, and thus allow the project to be displayed and edited.

But at the moment, we would be very happy if you could at least provide us with a solution to pre-check all constraints of a project before loading it and thus collect informations about which constraints are not valid and the tasks that are concerned. This way we could try to correct the issues and after that load the project.


Post by arcady »

There is no way of checking a dataset except loading it into the graph I'm afraid.

As an option you could use two instances of projects: one bound to the Gantt and another one used for just loading the data to check if there are any problems:

const project2 = new gantt.projectModelClass({
    ...
    listeners : {
        // let's track scheduling conflicts happened
        schedulingconflict : context => {
            console.debug(context);
        }
    }
});

await project.load();

Unfortunately the context given to the event is not user friendly. We have a ticket to change that to allow users to handle such cases gracefully. But it's not resolved yet.


Post Reply