Problem with grouping task

I have the gantt chart populate from database with ajax calls, but, when I using the task groupBy, I have the random ids on the main task group. So, if I add a task under the main task group, i get error in the ajax call, because the id is random. What can I do for resolve this problem ?

Thanks in advance


When you use groupBy, you get group task with ‘summary-bar’ class and temporary id, because these group tasks don’t store in database … S50Emg.png

When you add a new task to the group, the task is not assigned to parent (or assigned by parent = gantt.config.root_id). Because during the grouping there is no usual task hierarchy and new tasks are added to the project root.
The new task gets temporary id, which is not stored in the database. This generated ID is used only until the moment the event gets a permanent ID from the database.

So, the problem in ajax call is caused by
or the value of parent (which is equal 0 or something like this, it means the task hasn’t a parent task and it is in a project root),
either because of the temporary task id (this doesn’t depend on grouping, possibly you doing something wrong).