From f0c4e343da2ee9c7b58a408b55ccf450bf7a7172 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. --- .../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 ecb9480af4..c8e0150797 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 @@ -987,6 +987,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 %] @@ -1010,15 +1019,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