DataProcessor with setUpdateMode("off") sending only tasks or links not both


#1

Hi

I’m trying to use DataProcessor with my Gantt chart with setUpdateMode(“off”) setting (I want to send all the updates once user hits ‘Save’ button).

    var dp = new gantt.dataProcessor(url);
    dp.init(gantt);
    dp.setTransactionMode("JSON");
    dp.setUpdateMode("off");

However I encountered one problem. When I update 3 tasks and then create 1 link, only one request (for link creation) is sent (using dp.sendData()). If I do it in reverse order - first create link and then update 3 tasks - then 3 requests (for modification of 3 tasks) are sent, but not for the link creation.

So my question is - is this a standard behaviour of the dataProcessor? is there some way how to get around this and send all updates (including tasks and links) at once?

Thank you very much

Ondrej


#2

Hello,
Thank you for informing about the issue. Looks like it is a bug. I added it to our internal tracker. The dev team will fix it in the future, but I cannot give you any ETA.

I have the following example with the custom routing where the data is saved in an object with arrays, and you can manually send that data via custom methods:
https://snippet.dhtmlx.com/5/321546e47


#3

Hi Ramil,

thank you for your answer. That was exactly my intention, before I started this topic - to use a custom router to collect the updates and send them later manually. I just wanted to be sure, there is no other way…

Thank you

Ondrej