From 33cc9dde2ab304a1083e786139070a50858ed7c0 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Mon, 26 Jun 2023 14:38:41 +0000 Subject: [PATCH] Bug 29181: Create patron card creator batch from report result This patch adds the option of taking the results of a report that returns borrowernumbers and create a new patron card creator batch with those results. The logic of the dropdown menu has been modified in order to ensure that duplicate patron modification options aren't shown in the menu when a report return both borrowernumber and cardnumber. To test, apply the patch and create a new report which will return patron borrowernumbers, e.g. SELECT borrowernumber, cardnumber, surname, firstname FROM borrowers order by RAND() LIMIT 20 - Run your report - Click the "Batch operations with..." button at the top of the result - Click "Patron card creator" - A new tab should open with a new patron card creator batch with the patrons from your report. Signed-off-by: Sam Lau Signed-off-by: Katrin Fischer --- .../modules/reports/guided_reports_start.tt | 42 +++++++++++++++---- 1 file changed, 34 insertions(+), 8 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 e452fe4162..98812c4420 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 @@ -1003,6 +1003,15 @@ +
+ + + [% # Preserve the whitespace of the following textarea in order to format the values correctly %] + +
+ [% BLOCK batch_list %] [%- FOREACH result IN results %] [%- FOREACH cells IN result.cells %] @@ -1026,15 +1035,38 @@ - [% IF ( batch_biblionumbers || batch_itemnumbers || batch_cardnumbers ) || ( unlimited_total > 10 && limit <= 1000 ) %] + [% IF ( batch_biblionumbers || batch_itemnumbers || batch_cardnumbers || batch_borrowernumbers ) || ( unlimited_total > 10 && limit <= 1000 ) %]
- [% IF ( batch_biblionumbers || batch_itemnumbers || batch_cardnumbers ) %] + [% IF ( batch_biblionumbers || batch_itemnumbers || batch_cardnumbers || batch_borrowernumbers ) %]
-- 2.30.2