Hi - I have this process where I need to create auto-scheduling based on sort order. What I do to achieve this is I add temporary links in combination with existing links. However I’m getting odd results like this gap in the data when I want task 4 and 5 to be scheduled ASAP. Is this a bug that my older version of Gantt hasn’t resolved?
Hello Skoofy,
It can be that Task #4 has the SNET constraint, so it cannot start earlier that date. By default, the constraints are not displayed, so it may not be clear why the task doesn’t move to the end of its predecessor.
The dev team will fix that issue in the future and add a way to display constraints when the constraint logic is used.
Here is an example:
https://snippet.dhtmlx.com/imnsyx50
You can read about auto-scheduling modes in the following article:
https://docs.dhtmlx.com/gantt/desktop__auto_scheduling.html#timeconstraintsfortasks
https://docs.dhtmlx.com/gantt/desktop__auto_scheduling.html#versioncompatibility
If that doesn’t help you, probably the issue is related to the Gantt configuration, but it is hard to suggest what might be wrong as I don’t see your code.
In that case, please add your configuration to the following snippet and make sure that the issue is reproduced there:
Then, click on the Save
button and send me the link.
Or send me a ready demo with all the necessary JavaScript and CSS files so that I can reproduce the issue locally.
Is there a way I can simply set all constraints to ASAP to test this?
Hello Skoofy,
If you want to use the constraint logic, you will need to manually modify the constraints before the task is fully updated:
gantt.attachEvent("onBeforeTaskUpdate", function(id,updatedTask){
updatedTask.constraint_type = "asap";
});
Here is an example in the snippet:
https://snippet.dhtmlx.com/envc5o8x
After you drag a task, it will stay on that date. But as soon as you call the autoSchedule
method or drag its predecessor, the task will be auto-scheduled to the predecessor’s end_date.
A simpler way would be to not use the constraint logic at all:
https://docs.dhtmlx.com/gantt/desktop__auto_scheduling.html#versioncompatibility
Here is the snippet:
https://snippet.dhtmlx.com/sh7aqwhl