Editing binding values from the UI, sometimes it runs UpdateTask and sometimes it doesn't


#1

When the link lag moves, sometimes it updates the activity and sometimes it doesn’t!
SaveLink code

function saveLink(){
        var link = gantt.getLink(editLinkId);
 
        var lagValue = modal.querySelector(".lag-input").value;
        if(!isNaN(parseInt(lagValue, 10))){
            link.lag = parseInt(lagValue, 10);
        }
 
        gantt.updateLink(link.id);
        if(gantt.autoSchedule){
            gantt.autoSchedule(link.source);
        }
        endPopup();
    }

#2

Hello Dan,
It works that way because of the task constraints logic:
https://docs.dhtmlx.com/gantt/desktop__auto_scheduling.html#timeconstraintsfortasks
Task constraints have a higher priority than the link lag. For example, if link lag says that the task should start earlier, but it has the SNET constraint, it won’t start earlier than the specified constraint date:


Here is the snippet where the constraint dates are displayed in the timeline:
http://snippet.dhtmlx.com/5/97248387e


#3

I do not have the restrictions activated
or when using auto scheduling are they activated by default?


#4

Hello Dan,
Starting from the 6.1 version, Gantt uses the constraints logic by default:
https://docs.dhtmlx.com/gantt/desktop__auto_scheduling.html#versioncompatibility
If you want to change that, you need to enable the gantt.config.auto_scheduling_compatibility parameter.