You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds JSON export and import of custom report configurations, mirroring the Data Hub configuration export/import.
GET /bundle/custom-reports/config/{name}/export downloads the report configuration as a JSON file. Creation/modification dates and resolved user/role ids are excluded so the file is portable between environments.
POST /bundle/custom-reports/config/import accepts the exported JSON as a multipart file upload and creates a new report with the name stored in the file. Invalid JSON, a missing name or an already existing name return 422.
Both endpoints require the reports_config permission.
CustomReportRepository::cloneConfig() now shares the property whitelist and setter mapping with the new import path.
Additional info
Companion UI PR: pimcore/studio-ui-bundle#4120 (export action in the report tree context menu, import button in the sidebar toolbar).
Centralizes transferable fields for import, export, and cloning.
Adds import validation tests and OpenAPI documentation.
Assessment: The service/repository boundary and internal APIs are appropriate. However, property types are not validated before persistence (CustomReportConfigService.php:164), and the shared transfer/clone behavior lacks regression coverage (CustomReportRepository.php:193-197).
JSON_THROW_ON_ERROR can throw JsonException for malformed UTF-8 or otherwise non-encodable persisted configuration values, but this export path neither translates that exception nor declares it in the service/controller contract. This bypasses the repository's API exception handling and produces an undocumented generic failure. Catch and chain it in the appropriate domain/API exception, as src/Class/Service/BulkExport/BulkExportService.php:219-225 does, and update the related @throws/OpenAPI response declarations.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes in this pull request
Closes pimcore/platform-version#505
Adds JSON export and import of custom report configurations, mirroring the Data Hub configuration export/import.
GET /bundle/custom-reports/config/{name}/exportdownloads the report configuration as a JSON file. Creation/modification dates and resolved user/role ids are excluded so the file is portable between environments.POST /bundle/custom-reports/config/importaccepts the exported JSON as a multipartfileupload and creates a new report with the name stored in the file. Invalid JSON, a missing name or an already existing name return 422.reports_configpermission.CustomReportRepository::cloneConfig()now shares the property whitelist and setter mapping with the new import path.Additional info
Companion UI PR: pimcore/studio-ui-bundle#4120 (export action in the report tree context menu, import button in the sidebar toolbar).