Our flexible Kanban board for managing tasks with drag drop


Post by licjapodaca »

Strange behavior when I add a task to a column in Taskboard, here it is the test case:

  1. After I clicked the addTask button and change the text of the card using the inline feature and accept the change pressing the [CMD+Enter] key, it trigger the sync request with the following payload on it:

    screenshoot 2.png
    screenshoot 2.png (191.44 KiB) Viewed 948 times
  2. And then after I add the new task in the Database and generate the new ID of the task, I return the same payload but with the difference that I include the "ID" of the task in the same sync request like so:

    screenshoot 3.png
    screenshoot 3.png (186.17 KiB) Viewed 948 times
  3. When the request arrives, the event "onSync" of the ProjectModel triggers and I execute the following code:

    onSync: function({ source }) {
       source.acceptChanges();
    }
    
  4. Everything it's ok at this point, but if I decide to update the name of the same card I added and accept the change pressing [CMD+Enter] key it triggers the sync request but not the UPDATE operation, instead it triggers but the ADDED operation again like so:

    screenshoot 4.png
    screenshoot 4.png (194.5 KiB) Viewed 948 times

It's an issue or I'm wrong in something?

Regards


Post by alex.l »

Hi licjapodaca,

Looks like you have incorrect response format. You shouldn't put your record into added[] array, but put it into rows[] as you did for initial data load. Please, read this guide:
https://bryntum.com/docs/gantt/#Scheduler/guides/data/crud_manager.md#saving-data

All the best,
Alex


Post by licjapodaca »

Hi @alex, I already added the property rows in the answer but doesn't work only with that change ... I had to add for every task record the "$phantomId" field and the "id" field to the response of the request and everything is OK now.

The information about the response structure must be included in the TaskBoard documentation under CRUD operations to be a more detail documentation.

Thanks for your help.

Regards


Post by alex.l »

Thanks for your feedback! We will fix it shortly.

All the best,
Alex


Post Reply