Bug 26091 - Add column configuration and export options to catalog statistics report
Summary: Add column configuration and export options to catalog statistics report
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 19282
  Show dependency treegraph
 
Reported: 2020-07-29 16:15 UTC by Owen Leonard
Modified: 2021-06-14 21:33 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
20.11.00


Attachments
Bug 26091: Add column configuration and export options to catalog statistics report (4.70 KB, patch)
2020-07-29 16:50 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 26091: Add column configuration and export options to catalog statistics report (4.76 KB, patch)
2020-08-04 15:50 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 26091: Add column configuration and export options to catalog statistics report (4.82 KB, patch)
2020-08-07 13:23 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 26091: (follow-up) Remove unused TablesSettings usage (1.08 KB, patch)
2020-08-12 18:40 UTC, Owen Leonard
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2020-07-29 16:15:02 UTC
The catalog statistics report can return results in a table with an arbitrary set of columns, so it's not possible to define a global table settings configuration, but it is possible to add on-the-fly columns settings and export options to the page.
Comment 1 Owen Leonard 2020-07-29 16:50:22 UTC Comment hidden (obsolete)
Comment 2 ByWater Sandboxes 2020-08-04 15:50:34 UTC
Created attachment 107790 [details] [review]
Bug 26091: Add column configuration and export options to catalog statistics report

This patch makes the catalog statistics report output a DataTable with
on-the-fly column configuration and export options.

Because the report can generate results with an arbitrary set of table
headers, the columns set to be passed to DataTables is built on the fly
along with the table. There is no global table setting.

Since the "grand total" cell might reflect a total which includes hidden
columns, the table footer label now indicates "all results."

To test, apply the patch and go to Reports.

- Submit a query to the "catalog" statistics wizard which will return
  multiple results.
- On the results page, confirm that the DataTable displays correctly and
  that all controls work as expected, including column configuration and
  export options.
- Submit other queries which will return a different set of columns in
  the result. Confirm that everything continues to work as expected.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Comment 3 Katrin Fischer 2020-08-07 13:23:44 UTC
Created attachment 107956 [details] [review]
Bug 26091: Add column configuration and export options to catalog statistics report

This patch makes the catalog statistics report output a DataTable with
on-the-fly column configuration and export options.

Because the report can generate results with an arbitrary set of table
headers, the columns set to be passed to DataTables is built on the fly
along with the table. There is no global table setting.

Since the "grand total" cell might reflect a total which includes hidden
columns, the table footer label now indicates "all results."

To test, apply the patch and go to Reports.

- Submit a query to the "catalog" statistics wizard which will return
  multiple results.
- On the results page, confirm that the DataTable displays correctly and
  that all controls work as expected, including column configuration and
  export options.
- Submit other queries which will return a different set of columns in
  the result. Confirm that everything continues to work as expected.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Katrin Fischer 2020-08-07 13:24:19 UTC
Happy to have this patch, but wish we did a bit better for translations etc on those reports.
Comment 5 Jonathan Druart 2020-08-12 10:24:08 UTC
Comment on attachment 107956 [details] [review]
Bug 26091: Add column configuration and export options to catalog statistics report

Review of attachment 107956 [details] [review]:
-----------------------------------------------------------------

::: koha-tmpl/intranet-tmpl/prog/en/modules/reports/catalogue_stats.tt
@@ +1,2 @@
>  [% USE Branches %]
> +[% USE TablesSettings %]

We should not need that. Owen can you confirm?
Comment 6 Owen Leonard 2020-08-12 18:40:27 UTC
Created attachment 108155 [details] [review]
Bug 26091: (follow-up) Remove unused TablesSettings usage

Since the table column information is built in the template rather than in the columns_settings YML file we don't need "USE TablesSettings" in this template.
Comment 7 Jonathan Druart 2020-08-13 05:57:55 UTC
Pushed to master for 20.11, thanks to everybody involved!
Comment 8 Lucas Gass 2020-08-17 15:10:21 UTC
enhancement will not be backported to 20.05.x