Gantt.config.auto_types triggers a task update for every project task on page load

Hi, i’m trying out auto_types and I have noticed that for every project task in the list, each task is resubmitted back to the server via PUT on each page load.


(419 error is irrelevant to the issue)

Code snip

Hello Dan,
Unfortunately, your snippet is not ready-to-use to reproduce the issue. I had to update it to make Gantt won’t. And of course, because of that, I cannot reproduce the issue:

And I cannot reproduce it in a simpler snippet:

Hi @ramil, I have since streamlined my code in my app and am still experiencing the issue.

I have updated the snippet. Maybe to reproduce this you may need to try gantt with an API?

Hello Dan,
Thank you for the clarification.
I was able to reproduce it. Looks like it happens with the gantt.load function when the Data Processor is enabled. Gantt updates task types after they are loaded and sends the changes to the server-side.
And it means that you don’t save the task type on the server.
To make it work with the Auto types as you wish, you need to add a type column in your database and save the task type there. In that case, Gantt won’t convert tasks to projects and won’t try to send the changes to the server-side when you load tasks.

Another way is to use a custom code that will convert tasks to projects and vice versa, but use the gantt.refreshTask() command instead of the gantt.updateTask().
Here is an example of how it might be implemented:

1 Like