opensearch-project / reporting

Export and automate PNG, PDF, and CSV reports in OpenSearch Dashboards
https://opensearch.org/docs/latest/dashboards/reporting/
Apache License 2.0
28 stars 65 forks source link

[BUG] Report Generation Fails to Retain Column Filters from Discover Tab in OpenSearch 2.11 #935

Open devin-2 opened 8 months ago

devin-2 commented 8 months ago

What is the bug? When updating a saved search with new parameters in OpenSearch, the expected filtered columns are not retained in the generated reports. The Discover tab displays the correct filtered view, but reports include all columns, disregarding any filters applied.

How can one reproduce the bug? Go to the 'Discover' tab in OpenSearch Dashboard. Apply filters to the columns and save the search. Modify the saved search with a new query (e.g. changing search [ _index:<index-patternA-*> AND type:item1 AND (item2)] -> [ _index:<index-patternB-*> AND type:item1 AND (item2)]) Save the updated search and generate a report. The resulting report contains all columns, not respecting the filters set in the Discover tab.

What is the expected behavior? The generated report should reflect the same column filters that are visible in the Discover tab without requiring additional steps of adding or removing fields to trigger the correct filter application.

What is your host/environment? Version: OpenSearch 2.11

Do you have any additional context? The necessity to manually adjust fields to produce a report with the correct filters stands as an impediment to user experience and disrupts the flow of efficient workflow management. The ideal enhancement would be the introduction of a feature enabling users to directly export a CSV file from the Discover tab. This file would embody the precise filters and view currently displayed, thus eliminating the redundant step of saving searches for report generation. This would streamline the reporting process significantly. A similar request for enhancement has been identified and can be reviewed here