support icon indicating copy to clipboard operation
support copied to clipboard

Unplanned tasks resets duration on revertChanges

Open chuckn0rris opened this issue 1 year ago • 2 comments

Forum post

Hi,

We have a use case for unplanned work/ unplanned tasks to revert the changes when the backend returns an error on the save event. This all works fine, except the scheduler does not reset the duration field -> with as result the task is back in the unplanned grid, but the duration field is not set anymore.

It is reproducible on the public demo of unplanned work (https://bryntum.com/products/schedulerpro/examples/drag-unplanned-tasks/). Replace the onSave method with the following:

onSave() {
                Toast.show('TODO: Save data (see onSave() event for SchedulerPro)');
                // console.log('Changes:', this.project.changes);
this.project.commitAsync().then(() => {
    this.project.revertChanges();
    return this.project.commitAsync()
}).then(() => {
    this.project.acceptChanges();
});

        },
        

https://drive.google.com/file/d/1-9C4OUWLCAxXk-caWiK_3_1QTW0X5joi/view?usp=sharing

chuckn0rris avatar Mar 05 '24 17:03 chuckn0rris

Looks engine related @canonic-epicure, after event is "descheduled", start+end are reset to null which triggers duration to be lost too.

matsbryntse avatar Mar 10 '24 12:03 matsbryntse

+1 here

ghulamghousdev avatar Apr 22 '24 08:04 ghulamghousdev