Our state of the art Gantt chart


Post by hien.nguyen »

Hi team,

When I create new milestone "New milestone 1" => sync event fired, then I edit name but sync event not fire. That problem happen on server (when deploy). Please share me the way to fix it and some way to debug sync process.

BTW, in localhost it's OK.

Best regards.


Post by alex.l »

Hi hien.nguyen,

How can we reproduce that? What version of the code do you use on the server? What tools do you use to compress the code if any? Any uglifier used? I tried it with our module bundle and it works fine.
For test purposes, try to disable JS compressing/uglify on when deploy and test it again.

All the best,
Alex


Post by hien.nguyen »

Yes,

I used dependency rewire to compress my all react code into 1 js file and deploy into server. Do you have any config for fix my problem?

Best regards.


Post by alex.l »

Actually I don't even know what's happened because I didn't see your configs and still not sure if the problem in compressing tool. If so, then the config you are looking for should be in the tool and not in the Gantt.
Please try the scenario from my last reply?

All the best,
Alex


Post by hien.nguyen »

Hi team,

Now it happen on localhost with case: Add new milestone -> add new subtask in this new milestone -> after that sync event not fire for all actions (delete, edit, add new).

Please use my code to test my above case.

  • Server in nodejs_sample.zip: simple nodejs, please run by: npm i && node index.js (after extract).
  • Client in gantt_chart_reactjs.zip: please run npm run start.

Code in in this thread: viewtopic.php?t=23721

Best regards.


Post by tasnim »

Hello hien.nguyen,

I tried to reproduce it with your test case and it works fine for me. Please check the video attached below

Attachments
chrome_hIDgZWY2w7.mp4
(2.97 MiB) Downloaded 17 times

Post by hien.nguyen »

Yes,

Please try to edit New task 2 after add new milestone->subtask.

P/S: please do again as steps: add new milestone->subtask->edit subtask

Thanks.

Best regards.


Post by hien.nguyen »

Hi Tasnim,

Did you see bug as mine?

Thanks.

Best regards.


Post by alex.l »

Hi,

I was able to reproduce this problem. I also tried it with latest released version and still have that bug. I've opened a ticket to fix this problem here: https://github.com/bryntum/support/issues/6214

Thank you for the test case and steps to reproduce!

All the best,
Alex


Post by johan.isaksson »

Hi,

Seems like this is not a bug, but a "misconfiguration" of the backend. CrudManager protocol requires returning a "real" id for added records, to replace the generated phantom id (passed as $PhantomId). When that is not done, the record will remain in the stores added collection (and it wont sync changes)

I modified the express server, changing:

if(req.body.tasks && req.body.tasks.added)
      rows_tasks = req.body.tasks.added;

To

if(req.body.tasks && req.body.tasks.added) {
      rows_tasks = req.body.tasks.added;
      rows_tasks.forEach(taskData => {
            taskData.id = idCounter++;
      });
  }

(and add a var idCounter = 1000 at top)

It then works for me.

Best regards,
Johan Isaksson

Post Reply