Page 1 of 2

[INFO REQ] Column sorting + undo/redo

Posted: Thu Jun 18, 2020 6:56 am
by Qwerty

Hi there,

We've found an issue with the combination of column sorting and undo/redo.

Steps to Reproduce

  1. Go to the undo/redo example here: https://www.bryntum.com/examples/gantt/undoredo/
  2. Sort by the name column. Note that the undo button remains disabled
  3. In the browser console, run the following:
    gantt.project.taskStore.changes.modified.map(t => ({ name: t.name, changes: JSON.stringify(t.meta.modified)}))

You'll notice that there are in fact changes.

We're using the hasChanges and noChanges events on the ProjectModel to enable and disable our save button, which means after sorting a column the save button becomes enabled but the user is not able to undo their changes.

Could you please advise on some workarounds?

Thanks.


Re: [INFO REQ] Column sorting + undo/redo

Posted: Thu Jun 18, 2020 7:13 am
by Qwerty

An additional somewhat related issue can be seen by creating a link/dependency and then undoing the change.

  1. Go to the undo/redo example here: https://www.bryntum.com/examples/gantt/undoredo/
  2. Create a link between the "Unit tests" task and the "UI unit tests / individual screens"
  3. Undo
  4. In the browser console, run the following:
    gantt.project.taskStore.changes.modified.map(t => ({ name: t.name, changes: JSON.stringify(t.meta.modified)}))
    

I would expect there to be no changes to save, but there are in fact changes. This has the same effect as above -- causing the save button to become enabled.


Re: [INFO REQ] Column sorting + undo/redo

Posted: Thu Jun 18, 2020 9:05 am
by mats

Both issues reproduced, thanks for perfectly clear instructions. We'll have a look at these shortly!

https://github.com/bryntum/support/issues/958
https://github.com/bryntum/support/issues/959


Re: [INFO REQ] Column sorting + undo/redo

Posted: Fri Jun 19, 2020 1:24 am
by Qwerty

Thanks for the fast reply, mats!

We'll keep an eye on those issues and upgrade as soon as they're fixed.


Re: [INFO REQ] Column sorting + undo/redo

Posted: Fri Jun 19, 2020 8:25 am
by Qwerty

Hi mats,

Another related issue to this can be seen when deleting a task, then undoing that deletion.

Steps to Reproduce

  1. Go to the undo/redo example here: https://www.bryntum.com/examples/gantt/undoredo/
  2. Delete the "Run tests" task
  3. Undo
  4. In the browser console, run the following:
    gantt.project.taskStore.changes
    

There are items in both the modifications array and the added array.

The item in the added array is the biggest issue because if the user now saves, a duplicate task will be created.


Re: [INFO REQ] Column sorting + undo/redo

Posted: Fri Jun 19, 2020 8:31 am
by Qwerty

Additionally,

Do steps 1 - 4 as described above, then;

  1. Redo the deletion
  2. View the changes in the console using the snippet above.

The task should be in the deleted array. Instead, it's not, meaning the task will reappear when the page is loaded again.


Re: [INFO REQ] Column sorting + undo/redo

Posted: Fri Jun 19, 2020 11:04 am
by mats

Please start new threads for additional issues, or the forum threads become a mess :)


Re: [INFO REQ] Column sorting + undo/redo

Posted: Mon Jun 22, 2020 2:33 am
by Qwerty

Apologies mats,

We figured that these were symptoms of the same issue but we're more than happy to create additional threads.

Please see:


Re: [INFO REQ] Column sorting + undo/redo

Posted: Fri Jul 31, 2020 3:53 am
by Qwerty

Hi there,

We see that these issues have been re-prioritized from 2.1.6 to 2.1.8. Are we able to get a rough idea on when 2.1.8 will be released including the fixes for these issues?

Thanks again.


Re: [INFO REQ] Column sorting + undo/redo

Posted: Fri Jul 31, 2020 10:51 am
by Maxim Gorkovsky

Hello.
Issue #975 is already resolved and you can try it out in latest nightly build. 958 and 959 should hit next release too, which should be out in about 2 weeks.