I’m currently using the event onAfterAutoSchedule to send all the changed tasks to our back-end (using JSON Ajax call) after a user moves a single task. That works really well.
However I’ve now enabled the Gantt multi-select feature and now when multiple tasks are selected and then moved by the user, the onAfterAutoSchedule event gets called for each task being moved.
I’d like to only send one update with all the changed tasks to the back-end whether for one task or for multiple. I’d also like to display an on-screen message for the user to show that the system is still processing the back-end update.
Any help appreciated.
If you use the built-in Ajax module, you need to manually implement all the features you need. For example, you can turn off sending the changes after auto-scheduling tasks, and send them only after some time.
We are aware of the issue that auto-scheduling events fire before the task is updated. The dev team will fix it in the future, but I cannot give you any ETA.
If you use the Data Processor, right now, it is possible to send the changes in one request only in the
POST transaction mode:
Gantt doesn’t have a built-in way to show a message that the server is working with the updates, but when you update a task, it is highlighted with bold text. And you can use the
getSyncState method to check if Gantt received the OK status for all tasks from the server:
Thanks for the reply. I am not using the Data Processor (but I will now look into that). I’m just doing my own Ajax call.
For example, you can turn off sending the changes after auto-scheduling tasks, and send them only after some time.
That’s the solution I settled on. I am now accumulating all the updates from each onAfterAutoSchedule event and defer sending them for a period of time. That seems to work fine. I’m considering also doing some de-duplicating of tasks before sending.
Thanks again for your reply.