From f121beb6894118621350901865c9e9c7adb7bde3 Mon Sep 17 00:00:00 2001 From: Phil Ringnalda Date: Thu, 15 Aug 2024 15:11:44 -0700 Subject: [PATCH] Bug 37615: Clean up the form for sending cardnumbers from a report to batch patron modification Since bug 37197 switched reports back to using a POST to send cardnumbers to batch modification, we should also be using a single textarea rather than multiple inputs. Test plan: 1. Reports - Create from SQL - give it a name, and the SQL select cardnumber from borrowers limit 3 2. Save report - Run report 3. Batch operations with 3 visible records - Batch patron modification 4. Verify that you have the same three cardnumbers in Batch patron modification as were in the report. Signed-off-by: David Nind Signed-off-by: Marcel de Rooy Signed-off-by: Katrin Fischer --- .../prog/en/modules/reports/guided_reports_start.tt | 8 ++++---- tools/modborrowers.pl | 2 -- 2 files changed, 4 insertions(+), 6 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 ea57844345..f8b22a8a70 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 @@ -1012,10 +1012,10 @@ [%- END -%] [%- cardnumbers = PROCESS batch_list results=results batch_type='cardnumber' | trim | html %] [% IF !batch_borrowernumbers && cardnumbers %] - [% SET batch_cardnumbers = cardnumbers.length %] - [% FOR b IN cardnumbers.split("\n") %] - - [% END -%] + [% SET batch_cardnumbers = 1 %] + [% END %] diff --git a/tools/modborrowers.pl b/tools/modborrowers.pl index 502c1e0fa5..006d219275 100755 --- a/tools/modborrowers.pl +++ b/tools/modborrowers.pl @@ -66,8 +66,6 @@ if ( $op eq 'cud-show' ) { if( my $cardnumberlist = $input->param('cardnumberlist') ){ # User submitted a list of card numbers push @patronidnumbers, split( /\s\n/, $cardnumberlist ); - } elsif ( my @cardnumbers = $input->multi_param('cardnumber') ) { - @patronidnumbers = @cardnumbers; } elsif ( my $cardnumberuploadfile = $input->param('cardnumberuploadfile') ){ # User uploaded a file of card numbers binmode $cardnumberuploadfile, ':encoding(UTF-8)';