Bugzilla – Attachment 184885 Details for
Bug 40549
Warnings generated when using Import Patrons tool
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40549: Silence two warnings in patron import tool
Bug-40549-Silence-two-warnings-in-patron-import-to.patch (text/plain), 2.19 KB, created by
Tomás Cohen Arazi (tcohen)
on 2025-07-30 12:46:28 UTC
(
hide
)
Description:
Bug 40549: Silence two warnings in patron import tool
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2025-07-30 12:46:28 UTC
Size:
2.19 KB
patch
obsolete
>From 0ccf4831bb9f0ecf2ba67924aec4302d1a03e65b Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Wed, 30 Jul 2025 11:30:21 +0000 >Subject: [PATCH] Bug 40549: Silence two warnings in patron import tool > >To test: >1 - Tail the logs in a terminal: > tail -f /var/log/koha/kohadev/*.log >2 - Browse to Tools->IMport patrons >3 - Note warning when loading the page: > Use of uninitialized value $uploadborrowers in concatenation (.) or string at /kohadevbox/koha/tools/import_borrowers.pl line 105. >4 - Upload a patron file, under: Preserve existing borrowers > "If matching record is already in the borrowers table:" choose "Ignore..." >5 - Import the file >6 - Note an warning: > Use of uninitialized value $update_dateexpiry in string eq at /kohadevbox/koha/tools/import_borrowers.pl line 113. >7 - Apply patch, restart all >8 - Reload the tool >9 - Note no warning >10 - Upload the file again, same settings >11 - Note no warning >12 - Sign off! > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > tools/import_borrowers.pl | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/tools/import_borrowers.pl b/tools/import_borrowers.pl >index 41c40ee269c..9a703f4e813 100755 >--- a/tools/import_borrowers.pl >+++ b/tools/import_borrowers.pl >@@ -102,14 +102,14 @@ if ($matchpoint) { > my $createpatronlist = $input->param('createpatronlist') || 0; > my $dt = dt_from_string(); > my $timestamp = $dt->ymd('-') . ' ' . $dt->hms(':'); >-my $patronlistname = $uploadborrowers . ' (' . $timestamp . ')'; > > if ( $op eq 'cud-import' && $uploadborrowers && length($uploadborrowers) > 0 ) { > >+ my $patronlistname = $uploadborrowers . ' (' . $timestamp . ')'; > my $handle = $input->upload('uploadborrowers'); > my %defaults = $input->Vars; > my $overwrite_passwords = defined $input->param('overwrite_passwords') ? 1 : 0; >- my $update_dateexpiry = $input->param('update_dateexpiry'); >+ my $update_dateexpiry = $input->param('update_dateexpiry') // ""; > my $return = $Import->import_patrons( > { > file => $handle, >-- >2.50.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 40549
:
184862
| 184885