From 5edd58772fbe44cf21d5767efd847013a3f6170b Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 15 Sep 2026 12:10:25 +0200 Subject: [PATCH] Bug 43267: [26.05.x] 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: Nick Clemens Signed-off-by: Lucas Gass --- .../modules/reports/guided_reports_start.tt | 79 ++++++++++++++++++- 1 file changed, 76 insertions(+), 3 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 c70ee4656b..1c8f6cb067 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 @@ -1156,9 +1156,11 @@ [% IF ( batch_biblionumbers || batch_itemnumbers || batch_cardnumbers || batch_borrowernumbers || batch_reserve_ids ) || ( unlimited_total > 10 && limit <= 1000 ) %]
[% 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 %] @@ -1838,6 +1842,7 @@ const open_in_dt = [% open_in_dt ? 1 : 0 | html %]; const execute = [% execute ? 1 : 0 | html %]; + let report_results_dt;