If I programatically update a task with links on it and the parent gets adjusted only a “onAfterTaskUpdate” event is triggered on the task I updated. No event is generated for the parent. Is this expected? Is there something I need to change?
You can recreate this on the Auto Scheduling sample page using Chrome Dev Tools.
First, put this into the console so you can see the events triggered:
gantt.attachEvent("onAfterAutoSchedule", function() { console.log("onAfterAutoSchedule",arguments); });
gantt.attachEvent("onAfterLinkUpdate", function() { console.log("onAfterLinkUpdate",arguments); });
gantt.attachEvent("onAfterTaskAutoSchedule", function() { console.log("onAfterTaskAutoSchedule",arguments); });
gantt.attachEvent("onAfterTaskDrag", function() { console.log("onAfterTaskDrag",arguments); });
gantt.attachEvent("onAfterTaskMove", function() { console.log("onAfterTaskMove",arguments); });
gantt.attachEvent("onAfterTaskUpdate", function() { console.log("onAfterTaskUpdate",arguments); });
Next, run the following code to update Task #2.1 to 1 day earlier, which shifts the parent (Task #2)
var t = gantt.getTask(17);
t.start_date = new Date("04/02/2013");
gantt.updateTask(17);
One onAfterTaskUpdate event is all that is generated.