Indent / Outdent : are not fired in the taskStore

Our state of the art Gantt chart
Post Reply
User avatar
SIM-LTD
Posts: 461
Joined: Thu Mar 28, 2019 4:12 pm

Indent / Outdent : are not fired in the taskStore

Post by SIM-LTD » Fri Nov 08, 2019 11:12 am

This new release Gantt 1.20 brought the feature 'indent/outdent', thank you
Nonetheless, an issue with this new release is that the process Indent / Outdent are not fired in the taskStore; so it is not possible to monitor the taskStore update.

To reproduce this, simply go online https://www.bryntum.com/examples/gantt/basic/
Add the portion of codes below

Code: Select all

const gantt = new Gantt({....

gantt.taskStore.on({
    change( event) {
        console.log('Task changed....', event)
    }     
}); 
Then, select any task and select the option from contextual menu "Indent" or OutDent"
No event is fired from the taskStore
Hence it is impossible to catch the changes and then update the database accordingly, when "Indent" "OutDent" is used.
Attachments
Capture d’écran 2019-11-08 à 10.00.05.png
Capture d’écran 2019-11-08 à 10.00.05.png (233.67 KiB) Viewed 101 times
Capture d’écran 2019-11-08 à 10.00.16.png
Capture d’écran 2019-11-08 à 10.00.16.png (245.01 KiB) Viewed 101 times
Capture d’écran 2019-11-08 à 10.00.31.png
Capture d’écran 2019-11-08 à 10.00.31.png (238.85 KiB) Viewed 101 times

User avatar
Animal
Core Developer
Core Developer
Posts: 85
Joined: Fri Oct 13, 2017 12:36 pm

Re: Indent / Outdent : are not fired in the taskStore

Post by Animal » Fri Nov 08, 2019 11:44 am

With the underlying scheduling engine now in control, it's the project that will be the thing that fires the interesting events.

The engine might reject your changes, or because of the rules it is configured with, may make its own scheduling changes to the data, so it's the project which must be consulted.

I suggest taking a look at the stream of events fired by your app by adding the following listener.

Code: Select all

myGantt.project.on('catchAll', function(e) { console.log(e);});
That will log all events.

Particularly, you will see commit events fired on records.

User avatar
SIM-LTD
Posts: 461
Joined: Thu Mar 28, 2019 4:12 pm

Re: Indent / Outdent : are not fired in the taskStore

Post by SIM-LTD » Fri Nov 08, 2019 12:50 pm

All our Dev is based on listening to the taskSore, since the very beginning, Gantt JS has been launched.

Actually, we listen up not only taskStore but also assignmentStore, dependencyStore, etc...
In order to push in real-time every single change to the database. So far everything works well and due to issue unsolved we have created a couple of workarounds.

Now with the new release Gantt 1.2.0, you are advising us to listen up "the project".
Then changes that occur via the new option "Indent'/OutDent" cannot be listened up from the TaskStore but from "Project".

As we are in the middle of the acceptance test, It is impossible to turn the wheel 180° and change a bench of codes.... without redo an entire full-cycle test.... To be honest we are in a dead road.
Do we have to stick the couple (new release Scheduler 2.3.0 + Gantt 1.2.0 that are only compatible)
Or do we have to stick with Scheduler 2.2.x + Gantt 1.1.x and therefore missing all new features...

Considering all the risk in our side. We are asking you if it will be possible when "Indent / OutDent" is carried, to emit an event so as to be able from taskTore to listen up all changes.
Because, the "indent"/"outdent" changes the task to "child-to-Parent" or "Parent-to-Child" then why the taskStore is not informed about this changes while it is whenever a task is updated via move/resize/reorder (date, wbs, etc...) ?

User avatar
nickolay
Core Developer
Core Developer
Posts: 3369
Joined: Mon May 16, 2011 10:48 am

Re: Indent / Outdent : are not fired in the taskStore

Post by nickolay » Fri Nov 08, 2019 2:12 pm

Thank you for the report. Ticket created: https://app.assembla.com/spaces/bryntum/tickets/9458-the-%60change%60-event-not-fired-during-task-indent/details

The `change` event should be of course fired, we'll investigate.

What Animal was suggesting, that if you implement your own CRUD by you might be interested to handle it from inside of the "commit" event on the project instance. The "commit" event is fired when the "transactional" change happens in the whole project (its 1 event for all stores). This is Gantt only though currently and API will slightly change in the upcoming Gantt 2.0 release.
We offer training in both Ext JS and our products, read more here.
Read the API documentation

User avatar
SIM-LTD
Posts: 461
Joined: Thu Mar 28, 2019 4:12 pm

Re: Indent / Outdent : are not fired in the taskStore

Post by SIM-LTD » Fri Nov 08, 2019 2:26 pm

We thank you very much if you could fixe "change not fired during indent/outdent'
Will it be possible to be informed in order to download a "Nightly...." so as to run a test and this is very important..

Of course, we did understand what your colleague mentioned, and you have brought some light;
nonetheless, this approach has to be tested before.
When you say
The "commit" event is fired when the "transactional" change happens in the whole project
do you mean whatever the changes at every level (Project/Task/Dependency/Assignment/BaseLine/etc..) ?

User avatar
Animal
Core Developer
Core Developer
Posts: 85
Joined: Fri Oct 13, 2017 12:36 pm

Re: Indent / Outdent : are not fired in the taskStore

Post by Animal » Fri Nov 08, 2019 3:23 pm

Thanks for the explanation. I see where you are coming from. Yes, the taskStore should inform interested parties about data updates.

We silence events from the taskStore because the scheduling engine may perform multiple updates in response to the updates that we actually request, and these multiple updates may adversely affect UI performance.

But I see that it's essential for you to continue to know about all data changes.

I have created a ticket to address this: https://github.com/bryntum/bryntum-suite/issues/7

User avatar
SIM-LTD
Posts: 461
Joined: Thu Mar 28, 2019 4:12 pm

Re: Indent / Outdent : are not fired in the taskStore

Post by SIM-LTD » Fri Nov 08, 2019 3:35 pm

Thank you guys for your understanding.

For now, we cannot afford going backwards since we do not know all the aspect of that approach
myGantt.project.on('catchAll', function(e) { console.log(e);});


As soon as you have some news about this fix, please inform us, if this is possible of course, so we can download the "Nightly Build"

Thank you

Post Reply