Adjust start date and have all tasks also adjust


The use case is creating projects form a template. I am looking for a way to shift a project to a new date in the future and have all of the tasks also shift forward by the same amount.

Is there an easy way to do this? Docs says

  • If both the start_date and end_date options are specified and you create a task that is outside the range, the task will disappear from the chart. Meanin that the propety chane will do nothin to the children.

But we do want the build in logic to properly move tasks with their calendars, dependencies, etc.

So is the only option then having the project have a task 0 (which is the project itself), force all child tasks to be a child of that (which adds complexity to addin child task and validation) and then when a shift needs to happen change the start date of task 0?

I dont want this to conflict with the MS project import and export which we are using.



Hello Corbett,
Project tasks ignore the date parameters. Even if you modify them by using Gantt API and Javascript, your changes will be overwritten after the next repainting occurs. The project tasks will obtain the dates from their children.
But if you want to change the dates of all tasks and use the auto-scheduling extension, you can modify the gantt.config.project_start property and auto-schedule all tasks:
Here is an example of how it works:

Another way is to manually update the dates of all tasks by using the eachTask method:

Here is an example: