Premium support for our pure JavaScript UI components


Post by belms »

Hi,

We are trying to capture what fields have changed after the user edits a task and hits save in the edit task modal.

Usually the modified fields are present in taskRecord.modifications, available as part of the afterTaskSave event that gets fired.

However when revisions is enabled, this is no longer the case; the modifications object does not exist.

How can I capture all the fields modified by the edit modal in this case?
To reproduce this we can use similar code in the real time and advanced example (to see the behaviour with and without revisions):

With revisions: https://www.bryntum.com/products/gantt/examples/realtime-updates/
Without revisions: https://www.bryntum.com/products/gantt/examples/advanced/

afterTaskSave({taskRecord}) {
    console.log(taskRecord.modifications);
} 

When we make changes to any field in the modal and hit save, we see the modifications object being logged in the advanced example, but not the real time example.

If not for modifications object is there something else that i can rely on

Attachments
Screen Recording 2025-03-18 at 17.59.39.mov
(14.02 MiB) Downloaded 5 times
Screen Recording 2025-03-18 at 17.54.28.mov
(19.66 MiB) Downloaded 5 times

Post by alex.l »

Hi,

Actually in WS demo that you provided, you can see syncing via 2 Gantt instances using server-side. That means changes from one gantt projectModel has been committed and sent to server, second gantt did recieve it and applied. modifications of changes - it's not saved set of data. In your case there is no not saved data because it triggers auto commit and auto sent to server.

All the best,
Alex Lazarev

How to ask for help? Please read our Support Policy

We do not write the code in bounds of forum support. If you need help with development, contact us via bryntum.com/services


Post Reply