Task #2069
closedGeneral report to export tables to csv
100%
Description
Goal of this task is to implement general export of data in tables in CzechIdM UI.
Basic ideas are:- For every table (entity) suports this feature, will be created bulk action (uses same parent, witch contains main part of export logic).
- Bulk actions will be call universal report executor. This executor will be able to generate report by given DTOs and their EAVs.
- Only export of roles and identities are required in this version.
- Translation of column names by frontend table will be not supported in this version.
- Ability select only some of the columns for export will be not supported in this version.
Related issues
Updated by Peter Štrunc almost 5 years ago
- Description updated (diff)
- Status changed from New to In Progress
Updated by Radek Tomiška almost 5 years ago
- Project changed from Reports (reports) to IdStory Identity Manager
- Category set to Report
- Target version set to 10.2.0
Updated by Peter Štrunc almost 5 years ago
- % Done changed from 0 to 30
- Estimated time set to 24.00 h
Updated by Peter Štrunc almost 5 years ago
- % Done changed from 30 to 70
I implemented this functionality for identities, roles and systems.
Implementation is in pstrunc/2069-general-report.
Tests are in the same branch
TODO:- documentation
- do not show report executor in report agenda (discussed with Radek, we are not sure how to do this at the moment)
- dynamic entity report registration?
Updated by Peter Štrunc almost 5 years ago
- Status changed from In Progress to Needs feedback
- Assignee changed from Peter Štrunc to Radek Tomiška
I added documentation here https://wiki.czechidm.com/devel/documentation/adm/reports and here https://wiki.czechidm.com/tutorial/dev/add_general_report. I also fixed multivalued eav reporting and further refactored implementation in order to enable this feature not only for formable entities, but for all.
Everything is here https://github.com/bcvsolutions/CzechIdMng/pull/91
@tomiskar would you please review this ticket? Thanks
Updated by Radek Tomiška over 4 years ago
- Status changed from Needs feedback to In Progress
- Assignee changed from Radek Tomiška to Peter Štrunc
- % Done changed from 70 to 80
I did test and review, new fature basically works, nice! I like 'AbstractEntityExport' implementation with bulk action reusal.
Review Notes:
Major:
- security is missing in all formable report-exports (e.g. eav values are exported even if logged user cannot read them) - add IdmBasePermission.AUTOCOMPLETE (e.g. for formDefinitions) and IdmBasePermission.READ (in all other places).
- generic-entity-report label is shown as bulk action option on tables and bulk action localization is not resolved (maybe just some refactor issue, localization is prepared for 'generic-formable-entity-report')
Minor:
- we prefer String.format or MessageFormat used for concat strings - e.g AbstractFormableEntityExport#81
- warnings are in the code (memory leak with unclosed workbook in test, unused fields, unchecked types)
- FormableEntityXlsxRenderer.NAME should be spinal case (see other registrable components) as should be reused as component name (same string now)
- FromableEntityReportExecutor => FormableEntityReportExecutor :)
Notes (info only):
- I'm thinking about removal of artificial FromableEntityReportExecutor, but i don't know, how to register (or call) report renderer other way (can be solved in #2168).
- FormableFilter#PARAMETER_ADD_EAV_METADATA can be used to load dto with eav form instances (~values) included (+ secured), but it requires slight AbstractBulkAction refactoring (getService.get() usage move to new overidable bulk action method).
I will move other unimplemented features above (hide report from report agenda, download button etc.) to standalone tickets.
Updated by Radek Tomiška over 4 years ago
- Related to Task #2168: General report to export tables: remove atrificial FormableEntityReportExecutor added
Updated by Radek Tomiška over 4 years ago
- Related to Task #2169: General report to export tables: add dowload button added
Updated by Radek Tomiška over 4 years ago
- Related to Task #2171: General report to export tables: auto bulk action registration for all formable entites. added
Updated by Vít Švanda over 4 years ago
- Assignee changed from Peter Štrunc to Vít Švanda
- Target version changed from 10.2.0 to 10.3.0
Updated by Vít Švanda over 4 years ago
- Assignee changed from Vít Švanda to Ondrej Husník
Updated by Ondrej Husník over 4 years ago
- Status changed from In Progress to Needs feedback
- Assignee changed from Ondrej Husník to Radek Tomiška
- % Done changed from 80 to 90
All major and minor insufficiencies from review notes were added.
Pushed into original git branch pstrunc/2069-general-report.
Please provide me a feedback. Thank you.
https://github.com/bcvsolutions/CzechIdMng/pull/91/commits/e62f8938e582aa1771c4aafe47a875eeb3b0185b
Updated by Radek Tomiška over 4 years ago
- Status changed from Needs feedback to Resolved
- Assignee changed from Radek Tomiška to Peter Štrunc
- % Done changed from 90 to 100
I did test and code review together with #2171, it works and code is nice, thx!
Updated by Radek Tomiška over 4 years ago
- Status changed from Resolved to Closed
Updated by Radek Tomiška almost 4 years ago
- Related to Defect #2724: Report: General export report ends before attachment for download is created (download button is missing in modal window) added