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: https://docs.dhtmlx.com/gantt/api__gantt_project_start_config.html
Here is an example of how it works: http://snippet.dhtmlx.com/5/74d720254
Hello @ramil,
I was looking at this snippet http://snippet.dhtmlx.com/5/74d720254 you provided. It works for me if the date is greater than the current gantt.config.project_start but it does not respond if the new gantt.config.project_start is already passed date/lesser than of current gantt.config.project_start.
Hello @ramil,
The snippet https://snippet.dhtmlx.com/o7iotwzr I sent previously was on version 7.0 Pro because that is what we have purchased, When I change the version to 7.1 Pro it is working.
Is it a bug in 7.0 Professional? If so how can I resolve it?
I need to report to my company on the options available to fix it.
Hello,
Before the 7.1.4 version, the strict mode worked only when the auto_scheduling_compatibility config is enabled: Auto Scheduling Gantt Docs.
But the project_start config is related to the current constraint auto-scheduling logic that is used by Gantt. When the compatibility mode is enabled, Gantt uses the old logic that doesn’t use the project_start config at all. That’s why it doesn’t work in the 7.0.x versions.
Before the 7.1.4 version, Gantt didn’t reschedule tasks to an earlier date with forward scheduling after changing the project_start date. In the 7.1.4 version, the dev team added that feature. So, there is no way to enable it in the 7.0 version.
The only workaround for you would be to manually update the task dates after you change the project_start config.