"undo" not working in "onAfterAutoSchedule"

Hello,

i have some checks (project duration is larger after changes) in “onAfterAutoSchedule” and if there fail i want to undo.
But gantt save the changes in undo only after “onAfterAutoSchedule” is triggered.

Is this maybe a bug?

BR
René

Ok with a small “wait” it works. Seems like the save is not fast enough.
So the problem is still there but with the workaround it is fine for me.

Hello,
If there is a sequence of operations Gantt considers them as one operation. So, when you try to undo the changes, the extension doesn’t return previous values correctly.
We know about that bug, and it will be fixed in the future. I cannot give you an ETA, but I will notify you when the fix is ready.

Hello,
The dev team improved the work of the undo extension and added a way to save the task state before updating it via API calls:
https://docs.dhtmlx.com/gantt/desktop__undo_redo.html#undoingredoingchangesmadefromcode