Our state of the art Gantt chart


Post by Jerther »

Hi!

Here are the steps to replicate:

  • Open the Basic demo
  • Adjust the project configuration:
    const project = new ProjectModel({
        autoSync: true,
        transport : {
            load : {
                url : '../_datasets/launch-saas.json'
            },
            sync: { url: 'sync'}
            ...
  • Enable the dependencyEdit feature:
    new Gantt({
        features: {dependencyEdit : true},
        ...
    
  • Double click any dependency to open the dependency editor
  • Watch the network monitor
  • Hit save

Result:

A sync request is made with the following data:

{
	"type": "sync",
	"requestId": 15907744236732,
	"dependencies": {
		"updated": [{
			"fromSide": null,
			"toSide": null,
			"id": 5
		}]
	}
}

Expected:

  • No request at all since nothing has actually changed

Additional details:

  • If you do change the lag field and then save, a sync request is sent with the same data, just with the extra lag field set to the correct value.

Post by mats »

Reproduced, ticket opened: https://github.com/bryntum/support/issues/856

Thanks for the report! :)


Post by Jerther »

Don't forget the fromSide and toSide fields that got set to null for no reason ;)


Post by mats »

Ticket updated! Do you use those in your Gantt implementation?


Post by Jerther »

Dependencies? Sure! They're an essential part of it.

The dependencyEdit feature is a nice addition although it's pretty hard to double-click directly on a one pixel wide line ;)


Post by mats »

I meant if you use the fromSide/toSide (not typical in Gantt chart app).

We'll try to find a way to make the lines more "reachable", haven't found a good way yet.


Post by Jerther »

Now that I think of it, they do seem useless here. I think I ended up handling those fields because they are present in sync queries when dependencies are created:

{
	"type": "sync",
	"requestId": 15910160661674,
	"dependencies": {
		"added": [{
			"fromEvent": 110,
			"toEvent": 111,
			"lag": 0,
			"lagUnit": "day",
			"type": 2,
			"cls": "",
			"fromSide": "right",
			"toSide": "left",
			"$PhantomId": "_generatedvb3"
		}]
	}
}

Can I just drop/ignore them?


Post by pmiklashevich »

Yes, please ignore them. In Gantt they are not used. There is a type field which actually indicates what sides are used, please see the docs: https://www.bryntum.com/docs/gantt/#Gantt/model/DependencyModel#property-Type-static

Pavlo Miklashevych
Sr. Frontend Developer


Post by Jerther »

I'll drop them then. So even if these fields are being sent, they won't be a problem here anymore.

Thanks!


Post Reply