Jmix Report Add-On (v2.8): Missing data in report Json after Saving

Hi Jmix Support team,

Recently I have faced some issues with the Jmix Report Add-On.

The scenario was:

  1. Did some changes on a report using the Reports screen. (eg. adding/dropping parameters, changing templates etc.)
  2. Save the Report, and Export the report as zip file using the Reports screen.
  3. Import the zip file into another environment using the Reports screen.

And I found out that after the Import, certain details were missing, including the default template of the report.
Later found out that this was because after Saving the report, the json data in REPORT_REPORT.XML was disrupted and have some details that are missing, specifically : “code”, “roles”, “defaultTemplate”, and “description”.

This happens randomly, maybe 1 out of every 6 reports will face this, please help to look into this, thank you.

Hi @wjong

We’ll investigate the problem.
In the meantime, let us know if you find a reliable way to reproduce it.

Regards,
Konstantin

Hi @wjong,

I tried to reproduce the problem, but I could not get the same result. The only similar case I found is this one:

If you copy a report and then export the copy without opening and saving it, the exported zip contains the original report, without template files. When you import this zip, it does not create a new report. Instead it updates the original report (the one with the same id) and its templates become empty. After that the report cannot run, and the default template looks missing.

Issue: jmix-framework/jmix#5917

If this does not match your problem, please send us some more information:

  1. Your exact Jmix version and database (for example PostgreSQL 16).

  2. The JSON from REPORT_REPORT.XML of one broken report. If you can, send it before and after the save.

  3. How the broken reports were created: in the UI (wizard or editor), from code, by import, by Copy, or migrated from CUBA or an older Jmix version.

  4. What you change in the report before you click Save (description, parameters, templates, roles, etc.).

  5. Do the broken reports have roles on the “Roles and views” tab?

  6. Do you still get the problem on a new report that you create in the UI?

  7. Any errors or warnings in the application log at the moment of saving.

Thank you!

Regards,
Igor