From 26914173fde9047233fcfc825e37e1a63b59683c Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 15 Sep 2026 12:10:25 +0200 Subject: [PATCH] Bug 43267: Reports - only send visible records to batch operations from DT view When opening report results in the new DataTables view, batch operations should only send visible records. Same as the normal view. Test plan: 1. Create and run a report that will display more resulsts than fit on one page 2. Click "Open in DataTables". 3. Note "Batch operations with X visible records" shows the default page size (=20), and open the "Batch operations" dropdown to send results to e.g. batch item modification or batch record modification. 4. Confirm only the values on the currently visible page are sent, not the entire set. 5. Change the DataTable's page, or filter/search within it, and repeat => Confirm the count and the sent values update to the number of visible records 6. Confirm the standard (non-DataTables) report view is unaffected. Signed-off-by: Andrew Fuerste Henry Signed-off-by: Pedro Amorim --- .../modules/reports/guided_reports_start.tt | 71 ++++++++++++++++++- 1 file changed, 69 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt index 730870f14e..2c8c5202e8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt @@ -1222,7 +1222,9 @@ [% IF ( batch_biblionumbers || batch_itemnumbers || batch_cardnumbers || batch_borrowernumbers || batch_reserve_ids ) %]
+ [% ELSIF header_row.$place.cell == 'reserve_id' || header_types.item(header_row.$place.cell) == 'reserve_id' %] + [% cells.cell | $raw %] [% ELSE %] [% cells.cell | $raw %] [% END %] @@ -1887,6 +1891,7 @@ const open_in_dt = [% open_in_dt ? 1 : 0 | html %]; const execute = [% execute ? 1 : 0 | html %]; + let report_results_dt;