Our state of the art Gantt chart


Post by SIM-LTD »

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
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 (232.75 KiB) Viewed 1561 times
Capture d’écran 2019-11-08 à 10.00.16.png
Capture d’écran 2019-11-08 à 10.00.16.png (244.15 KiB) Viewed 1561 times
Capture d’écran 2019-11-08 à 10.00.31.png
Capture d’écran 2019-11-08 à 10.00.31.png (237.96 KiB) Viewed 1561 times

Post by Animal »

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.
myGantt.project.on('catchAll', function(e) { console.log(e);});
That will log all events.

Particularly, you will see commit events fired on records.

Post by SIM-LTD »

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...) ?

Post by nickolay »

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.

Post by SIM-LTD »

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..) ?

Post by Animal »

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

Post by SIM-LTD »

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