Migration of Reports from CUBA

Hi,

We are currently trying to migrate Reports from CUBA to JMIX’s Reports add-on. Although there are no major differences, the meta class names of the entity slightly differ, eg:
CUBA - report$Report / report$Template
JMIX - report_Report / report_Template

This is causing an issue as we could not export our Reports from CUBA and import it into JMIX directly, and we have a big number of existing reports available. Could you please advise us on what is the best approach to this?

Hi,

Your issue - reports are imported but don’t work or you can’t import them at all?

And what versions of your CUBA and Jmix projects?

Regards,
Ivan

Reports are exported from CUBA 7.2.21
Trying to import in JMIX 2.5.0

After exporting the reports I could not import them at all into JMIX as it would show an error saying "Metadata ‘report$Report’ is not found.

Hi,

There is no automatical way to import CUBA report to Jmix.

Possible WAs:

  1. Unpack exported archive and manualy change name of all report$… metaclasses to report_…. Slow in case of big amount of reports.
  2. We have migration script (liquibase) to migrate existing reports during project migration from CUBA to Jmix 1.x (it renames metaclasses).
    So you can make a “fake” migration - clone project database (do not affect your main environment) with required reports and perform migration (Migration from CUBA Platform :: Jmix Documentation). You don’t need complete migration - just make sure migration scripts are applied and reports tables & data are converted to Jmix format. After that you can export this data as SQL insert statements and apply them to database of target Jmix project.
    This approach allows to process big amount of reports, but it’s more complicated and requires careful testing & dry run.

Also there can be issues if something mismatch within business-entities involved in specific report (e.g. report displays list of some entities, but this entity has different structure or metaclass name).

Created an issue to research the possibility to implement automatical conversion during import Support import reports exported from CUBA · Issue #4423 · jmix-framework/jmix · GitHub

Regards,
Ivan