cuba-platform / reports

CUBA Reports Addon
https://www.cuba-platform.com/
Apache License 2.0
9 stars 4 forks source link

Support filtering by entity type for ExecutionHistoryAction and RunReportAction #232

Closed GlebDurygin closed 4 years ago

GlebDurygin commented 4 years ago

Environment

Platform version: 7.2 Relates to #212

Description of the bug or enhancement

First case

The ExecutionHistoryAction and RunReportAction show in the modal dialog a list of available reports for the selected screen. If the action is defined inside the list component, then you need to limit the list of available reports by the entity associated with the list component.

Second case

If the RunReportAction is defined inside the list component and some item is selected, then you need to set this element as the initial value for the report input parameters.

Updates

1) The ExecutionHistoryDialog and ReportRun modal dialogs show reports related to the current screen and an entity type, associated with the selected list component. 2) The InputParameters modal dialog has initial values equal to the selected items in the list component.

QA

Test project

filtering-for-standard-actions.zip

Test Case 1

1) To view the report execution history set app property reporting.executionHistory.enabled = true. 2) Open Test Screen 3) Invoke ExecutionHistoryAction 4) The modal ExecutionHistoryDialog opens, where reports related to the current screen and an entity type, associated with the selected list component will be displayed. Reports related to this screen and another list component should not be displayed.

Test Case 2

1) Open Test Screen 2) Invoke RunReport 3) The modal ReportRun opens, where reports related to the current screen and to an entity type, associated with the selected list component will be displayed. Reports related to this screen and another list component should not be displayed.

Test Case 3

1) Open Test Screen 2) Select an item 3) Invoke RunReport 4) The modal ReportRun opens, where reports related to the current screen and a specific metaclass, associated with the list component will be displayed. 5) Select a report 6) The modal InputParameters opens, where the input parameter is the item selected in step 2 Check this case for a single entity and list of entities.

How to link screen and report

To associate a screen with a report you need: 1) Open Report editor 2) Go to Roles and Screens tab 3) Add a new screen to report.

MikhailSilk commented 4 years ago

Case 1

  1. To view the report execution history set app property reporting.executionHistory.enabled = true.
  2. Create a new report for the Customer entity
  3. Open the Roles and Screens tab and add the Test screen
  4. Run the report
  5. Open the Test screen
  6. Invoke ExecutionHistoryAction for the Employes entity
  7. In the opened ExecutionHistoryDialog Click on the "Execution history" button

AR: Shows the execution history of the report for the Customer entity изображение

Case 2

  1. Start to create a new report for the Customer entity
  2. Select the report type Report for list of entities, selected by query
  3. Open the Roles and Screens tab and add the Test screen
  4. Run the report
  5. Open the Test screen
  6. Invoke RunReport for the Customer entity

AR: The created report does not show in the table. Also, the created report does not show in the ExecutionHistoryDialog

GlebDurygin commented 4 years ago

Case 2

Start to create a new report for the Customer entity
Select the report type Report for list of entities, selected by query
Open the Roles and Screens tab and add the Test screen
Run the report
Open the Test screen
Invoke RunReport for the Customer entity

AR: The created report does not show in the table. Also, the created report does not show in the ExecutionHistoryDialog

It is correct behavior, because Report for a list of entities, selected by query does not contain a report parameter of theEntity type. To view the execution history for such reports, open the Reports tab, select the report you are interested in and click the ExecutionHistory button. To run such a report, use the Run reports tab.