Bugzilla – Attachment 129671 Details for
Bug 29761
Patron batch modification tool - duplicated information on the listing page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29761: Batch patron modification page should display patrons once if the same ID is inputted multiple times
Bug-29761-Batch-patron-modification-page-should-di.patch (text/plain), 2.71 KB, created by
Owen Leonard
on 2022-01-20 18:02:24 UTC
(
hide
)
Description:
Bug 29761: Batch patron modification page should display patrons once if the same ID is inputted multiple times
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2022-01-20 18:02:24 UTC
Size:
2.71 KB
patch
obsolete
>From 6be7aad965d10dc9784eb35c60a44f1019abfbf3 Mon Sep 17 00:00:00 2001 >From: Alex Buckley <alexbuckley@catalyst.net.nz> >Date: Mon, 13 Dec 2021 02:31:51 +0000 >Subject: [PATCH] Bug 29761: Batch patron modification page should display > patrons once if the same ID is inputted multiple times > >If a cardnumber, SMS number, or borrower number is inputted multiple >times then the batch patron modification page should not display that >patron multiple times. > >Test plan: >1. Create three text files that list card numbers, SMS numbers, and > borrower numbers for three patrons. Example lists are below, notice > in each there is one number duplicated: > >Card numbers: > 23529000035676 > 23529000651225 > 23529000080862 > 23529000035676 > >Borrower numbers: > 19 > 49 > 7 > 49 > >SMS numbers: > 2125551212 > 2125551212 > 2125551213 > 2125551214 > >2. Enable sending of SMS messages: > * Set SMSSendDriver system preference to Email > >3. Make sure the cardnumbers, borrower numbers, and SMS numbers listed > above belong to patrons in your Koha > >4. Go to Tools > Batch patron modification > >5. Upload lists of cardnumbers, SMS numbers, and borrower numbers above, > and confirm the following is happening in the batch patron > modification page: > - Upload the text file of cardnumbers. Notice one patron is displayed > twice > - Paste in the list of cardnumbers. Notice one patron is displayed > twice > - Upload the text file of SMS numbers. Notice one patron is displayed > twice > - Paste in the list of SMS numbers. Notice one patron is displayed > twice > - Upload the text file of borrower numbers. Notice one patron is > displayed twice > - Paste in the list of borrower numbers. Notice one patron is > displayed twice > >6. Apply patch and restart services > >7. Repeat step 5 and this time observe that the patron record is not > duplicated in the batch patron modification page > >Sponsored-By: Catalyst IT > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >--- > tools/modborrowers.pl | 4 ++++ > 1 file changed, 4 insertions(+) > >diff --git a/tools/modborrowers.pl b/tools/modborrowers.pl >index d882297b48..b235d212ac 100755 >--- a/tools/modborrowers.pl >+++ b/tools/modborrowers.pl >@@ -37,6 +37,7 @@ use Koha::Libraries; > use Koha::Patron::Categories; > use Koha::Patron::Debarments qw( AddDebarment DelDebarment GetDebarments ); > use Koha::Patrons; >+use List::MoreUtils qw(uniq); > > my $input = CGI->new; > my $op = $input->param('op') || 'show_form'; >@@ -110,6 +111,9 @@ if ( $op eq 'show' ) { > > my $max_nb_attr = 0; > >+ # Make sure there is only one of each patron id number >+ @patronidnumbers = uniq( @patronidnumbers ); >+ > for my $patronidnumber ( @patronidnumbers ) { > my $patrons; > if( $useborrowernumbers == 1 ){ >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 29761
:
128878
|
129046
|
129671
|
129672
|
130763