Project

General

Profile

Task #2069

General report to export tables to csv

Added by Peter Štrunc 7 months ago. Updated 4 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Report
Target version:
Start date:
02/19/2020
Due date:
% Done:

100%

Estimated time:
24.00 h

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

Related to CzechIdM - Task #2168: General report to export tables: remove atrificial FormableEntityReportExecutorNew03/31/2020

Related to CzechIdM - Task #2169: General report to export tables: add dowload buttonClosed03/31/2020

Related to CzechIdM - Task #2171: General report to export tables: auto bulk action registration for all formable entites.Closed03/31/2020

History

#1 Updated by Vít Švanda 7 months ago

  • Description updated (diff)

#2 Updated by Vít Švanda 7 months ago

  • Description updated (diff)

#3 Updated by Peter Štrunc 7 months ago

  • Description updated (diff)
  • Status changed from New to In Progress

#4 Updated by Radek Tomiška 7 months ago

  • Project changed from Reports (reports) to CzechIdM
  • Category set to Report
  • Target version set to 10.2.0

#5 Updated by Peter Štrunc 7 months ago

  • % Done changed from 0 to 30
  • Estimated time set to 24.00 h

#6 Updated by Peter Štrunc 7 months 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?

#7 Updated by Peter Štrunc 7 months 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

#8 Updated by Radek Tomiška 6 months 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.

#9 Updated by Radek Tomiška 6 months ago

  • Related to Task #2168: General report to export tables: remove atrificial FormableEntityReportExecutor added

#10 Updated by Radek Tomiška 6 months ago

  • Related to Task #2169: General report to export tables: add dowload button added

#11 Updated by Radek Tomiška 6 months ago

  • Related to Task #2171: General report to export tables: auto bulk action registration for all formable entites. added

#12 Updated by Vít Švanda 6 months ago

  • Assignee changed from Peter Štrunc to Vít Švanda
  • Target version changed from 10.2.0 to 10.3.0

#13 Updated by Vít Švanda 5 months ago

  • Assignee changed from Vít Švanda to Ondrej Husník

#14 Updated by Ondrej Husník 5 months 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

#15 Updated by Radek Tomiška 5 months 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!

#16 Updated by Radek Tomiška 4 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF

Go to top