Strong link between the two tasks

Hello to all.
I need to use a strong link between the two tasks.
For example:I have a Task#2 which execute after Task#1. If I change the start time or duration Task #1, I need to automatically change the start time Task#2.
Have any idea how to do it?


I can do this automatically removing fields ‘start_date’ and ‘duration’ …

I created the following function to execute before I use the parse method:

window.treatTasks = function (dados) {
var arr_dados = {};
var new_dados =;
$.each(dados[‘data’],function (key,obj){
parent_id = obj.parent;
$.each(,function (key_, obj_){
if ( === parent_id){
delete new_dados[key_][‘duration’];
delete new_dados[key_][‘start_date’];
arr_dados.links = dados.links; = new_dados;
return arr_dados;

tasks = window.treatTasks(var_gantt);
gantt.parse (tasks);

guess helped :slight_smile:

there a better way?

Can be done through events, there is a onAfterTaskUpdate event, which will fire after any task is changed. … event.html

It possible to assign a code to the event, that will update the dates of related tasks.