[INFO REQ] Column sorting + undo/redo

Our state of the art Gantt chart


User avatar
Qwerty
Premium Member
Premium Member
Posts: 90
Joined: Mon Aug 05, 2019 9:00 am

[INFO REQ] Column sorting + undo/redo

Post 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:

    Code: Select all

    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.


User avatar
Qwerty
Premium Member
Premium Member
Posts: 90
Joined: Mon Aug 05, 2019 9:00 am

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

Post 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:

    Code: Select all

    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.


User avatar
mats
Core Developer
Core Developer
Posts: 16347
Joined: Sat Dec 19, 2009 11:41 pm
Location: Sweden
Contact:

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

Post 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

Tired of debugging javascript errors in web applications? Try our new error logging service RootCause, or read more on the Sencha blog

@bryntum
Facebook
API documentation

User avatar
Qwerty
Premium Member
Premium Member
Posts: 90
Joined: Mon Aug 05, 2019 9:00 am

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

Post by Qwerty »

Thanks for the fast reply, mats!

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


User avatar
Qwerty
Premium Member
Premium Member
Posts: 90
Joined: Mon Aug 05, 2019 9:00 am

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

Post 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:

    Code: Select all

    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.


User avatar
Qwerty
Premium Member
Premium Member
Posts: 90
Joined: Mon Aug 05, 2019 9:00 am

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

Post 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.


User avatar
mats
Core Developer
Core Developer
Posts: 16347
Joined: Sat Dec 19, 2009 11:41 pm
Location: Sweden
Contact:

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

Post by mats »

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

Tired of debugging javascript errors in web applications? Try our new error logging service RootCause, or read more on the Sencha blog

@bryntum
Facebook
API documentation

User avatar
Qwerty
Premium Member
Premium Member
Posts: 90
Joined: Mon Aug 05, 2019 9:00 am

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

Post 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:


User avatar
Qwerty
Premium Member
Premium Member
Posts: 90
Joined: Mon Aug 05, 2019 9:00 am

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

Post 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.


User avatar
Maxim Gorkovsky
Core Developer
Core Developer
Posts: 3212
Joined: Wed Jan 08, 2014 11:46 am

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

Post 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.


Post Reply