Hi,
I have a Gantt chart where I am using autoscheduling as well as custom form for lightbox. The undo works fine for normal lightbox however for
custom lightbox when I do a undo all the dependent task changes get undone but the main task changes don’t go back to the old value.
For the above mentioned conditions (custom lightbox) I noticed that when my save method was following -
function save(taskId, form) {
gantt.getTask(taskId).progress = getFieldFromTask(‘percentComplete’, form, 1)/100;
gantt.getTask(taskId).updated = true;
gantt.updateTask(taskId);
}
The undo_stack had two entries first one was a Array[1] (main task), 2nd one Array[6] (there were 6 dependent tasks) …so when undo was being done pop method returned only the 6 tasks (dependent) .
I tried commenting the gantt.updateTask(taskId) then the undo_stack had only 1 entry with 6 tasks. The first task was not in the stack though its values were changed.
Could you pls. help me with the same.
Thanks & Regards,
Tripty