Premium support for our pure JavaScript UI components


Post by MauriceLapre »

Hi,

I've got a Gantt paired with ResourceHistogram like your demo. I'm using loadInlineData to load all data. That's working fine on first load.

I've got a refresh option, which just does the whole process of getting data again in the same way (but now with Gantt and Histogram already in place, if that should make a difference). It clears the project stores and then it will actually just get a different set of eventsData and assignments (if any), resources are fetched again also but that dataset will be the same. This process fails after all data is loaded, so after project.loadInlineData, with this error:

Bryntum Gantt - 021.png
Bryntum Gantt - 021.png (34.52 KiB) Viewed 2078 times

I thought maybe it was resourceData related, but I also tried with setting that section to what's in the launch-saas.json and that failed with the same error message.

Tried debugging it but I can't seem to figure out what's undefined... and also why it does work on first load.

Could you have a look at this? Thank you!


Post by mats »

Could you please share the code how you load the data, and ideally the dataset too?


Post by MauriceLapre »

Hi Mats,

I'm getting the data with several AjaxHelper.fetch calls, combining it to the dataset example as attached.

const totalData = backendTools.getAllData().then(result => {
            project.loadInlineData(result);                       
gantt.collapseAll(); });

Then just call loadInlineData with the result (the combined returndata) of that function, like above. This works perfectly on the first load of the app.

My reload function can be called by a button and does the same, but it's clearing stores first. Doesn't make a difference if I clear the resourceStore first and reload that too or leaving that as it is and ignore the reloaded resources data.

reloadData() {
        console.log('reloadData');      

    gantt.project.stm.disable();

    gantt.project.taskStore.removeAll();
    gantt.project.assignmentStore.removeAll();
    gantt.project.resourceStore.removeAll();

    Toast.hideAll();

    const totalData = backendTools.getAllData().then(result => {        
        gantt.project.loadInlineData(result);
            
        gantt.collapseAll();
    }); 

    gantt.project.stm.enable();        

}
Attachments
Bryntum Gantt - dataset.json
(9.79 KiB) Downloaded 155 times

Post by alex.l »

Hi MauriceLapre,

I checked it in our 'Gantt with resource histogram' demo. I used your data and your code in our app and I see no errors.
Could you please try yourself to reproduce it in our example or create a simple test case and attach it here, so we will be able to reproduce and debug the problem.

Thank you,
Alex

All the best,
Alex


Post by MauriceLapre »

Created this code based on the Histogram demo. I found out it has definitely to do with the resourceInfo column in Histogram. With only the name column there's no issue.

Created two buttons. Load will load the data. Reload will clear stores. Then press Load again (having resourceInfo column active in Histogram) and the issue appears.

Attachments
app-ML20201211.module.js
(13.45 KiB) Downloaded 151 times

Post by alex.l »

Thank you for your test case! Reproduced, here is a ticket: https://github.com/bryntum/support/issues/2088

All the best,
Alex

All the best,
Alex


Post by MauriceLapre »

Hi,

I have a follow-up issue on this. After clearing and reloading data (using same function loadinlinedata), the assignments don't appear anymore. Also, resource calendar column shows id instead of name so something is up with reloading resources and/or assignments.

See code attached to load in histogram demo to reproduce. It has 2 assignments on first load. Then press Reload (clears stores) and Load again. Assignments don't show up anymore.

Could you please look at this asap? It's a showstopper for our scheduling app now... Workaround and/or quick fix would be much appreciated. Thank you.

Attachments
app-ML20201218.module.js
(13.59 KiB) Downloaded 164 times

Post by pmiklashevich »

Accepted! There is a problem with ResourceHistogram refreshing. The data seems correct. If you check the gantt part and see the assignments the records are there. I simplified the data you provided and created the ticket: https://github.com/bryntum/support/issues/2138
Thank you for the report!

Pavlo Miklashevych
Sr. Frontend Developer


Post by MauriceLapre »

Hi,

Could I get a status update on this issue (#2138)? It's been a couple of months now, and this is a blocking issue for us.

Thank you.

Kind regards,

Maurice


Post by alex.l »

Hi Maurice,

Sorry for long waiting, we aimed to fix it in 4.1.1 release.

All the best,
Alex

All the best,
Alex


Post Reply