Premium support for our pure JavaScript UI components


Post by alex.l »

Hi NARESH.RAI,

I was able to reproduce this bug using your last described scenario. I've created a ticket, it will be fixed as soon as possible: https://github.com/bryntum/support/issues/1633

About your screenshot in the last post. Please, always provide steps to reproduce, it saves time for investigation. And please provide a version of Gantt you use. I am not able to reproduce the issue using the next scenario:

  1. create new task
  2. export json, import json using next code:
    jsonData = gantt.taskStore.json;
    gantt.taskStore.json = jsonData;
    
  3. create one more task

What else is required to reproduce this?

All best,
Alex

All the best,
Alex


Post by NARESH.RAI »

To reproduce duplicate ID issues follow below steps - >
1) create few task + dependency etc.. in gantt chart (using same dynamic project creation flow as mentioned in last post ).
2) Export json, import json using next code:

jsonData = gantt.taskStore.json;
gantt.taskStore.data= JSON.parse(jsonData);

3) Now after import, create new task using code which mentioned in angular / advance demo ->

async onAddTaskClick() {
    const gantt: any = this.gantt.ganttInstance,
      added = gantt.taskStore.rootNode.appendChild({
        name: 'New task',
        duration: 1,
      });

await gantt.project.propagate();
await gantt.scrollRowIntoView(added);
gantt.features.cellEdit.startEditing({
  record: added,
  field: 'name',
});
  }

I am calling this add function on button, when u hit this button u will get this duplicate ID error.


Post by alex.l »

Thanks a lot, and Gantt version please?

All the best,
Alex


Post by NARESH.RAI »

Gantt version - 4.0 beta 2


Post by alex.l »

Hi NARESH.RAI,

Unfortunately I still not able to reproduce the bug you described using your scenario and your version of Gantt in our advanced example.
Could you please try it yourself?
I've attached the app with my changes that I used for tests.
Except the changes I applied (assign project after gantt created and apply json data before add new task), I added few tasks and dependencies to gantt before clicked on addTask button, as you mentioned in your script.

All best,
Alex

Attachments
advanced.zip
(2.07 MiB) Downloaded 105 times

All the best,
Alex


Post by johan.isaksson »

Hi,

The ticket about DependencyStore not being able to consume its own JSON has been resolved (https://github.com/bryntum/support/issues/1633). The issue was that "exported" JSON string did not take field persistance and serialization settings into account, instead just supplying the raw value.

Now it will respect those settings, which should make the exported JSON importable again. The fix will be available in the next release, or in nightlies tomorrow. Hope it helps!

Best regards,
Johan Isaksson

Post by NARESH.RAI »

Thanks for update.
Hopefully it will also resolve "assignments" exported json which also have same issue.


Post by fabio.mazza »

Hi Naresh,

The fix should be affected assignments as well yes. Please let us know if it works or if there is any other problem. Thank you.

Best regards,
Fabio


Post Reply