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.

E.g.:

(419 error is irrelevant to the issue)

Code snip

http://snippet.dhtmlx.com/80501fe06

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:
http://snippet.dhtmlx.com/894f5b558
https://files.dhtmlx.com/30d/bef6f04fa06f2c722a64911db01a2c5f/vokoscreen-2019-09-02_18-07-12.avi

And I cannot reproduce it in a simpler snippet:
http://snippet.dhtmlx.com/8a0d04fd5
https://files.dhtmlx.com/30d/516ca0af8e1e32927d6a8da598243323/vokoscreen-2019-09-02_18-03-31.avi

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?

https://snippet.dhtmlx.com/4b3c2c64e

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:
http://snippet.dhtmlx.com/457d1beb4

1 Like