Bugzilla – Attachment 144732 Details for
Bug 32501
Koha::Patrons::Import contains incorrect borrowernumber references
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32501: Consistently refer to borrowernumber
Bug-32501-Consistently-refer-to-borrowernumber.patch (text/plain), 3.45 KB, created by
Martin Renvoize (ashimema)
on 2022-12-20 08:16:16 UTC
(
hide
)
Description:
Bug 32501: Consistently refer to borrowernumber
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2022-12-20 08:16:16 UTC
Size:
3.45 KB
patch
obsolete
>From 6014150e02400ccb4e61bba124a331a34b0de626 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Tue, 20 Dec 2022 08:13:30 +0000 >Subject: [PATCH] Bug 32501: Consistently refer to borrowernumber > >We had a mixture of $patron->borrowernumber, $patron->id and >$borrowernumber. > >This patch updates the occurences of $patron->borrowernumber to just >refer to $borrowernumber which is set correctly throughout the script. > >Test plan >1) For newly created borrowers on import check that the produced welcome > notice correctly fills the borrower details from the template. >2) For updated borrowers in the import, check that the debartments still > work as expected. >--- > Koha/Patrons/Import.pm | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > >diff --git a/Koha/Patrons/Import.pm b/Koha/Patrons/Import.pm >index 6f62cc1a37c..e743697a384 100644 >--- a/Koha/Patrons/Import.pm >+++ b/Koha/Patrons/Import.pm >@@ -387,7 +387,7 @@ sub import_patrons { > if ( $patron->is_debarred ) { > AddDebarment( > { >- borrowernumber => $patron->borrowernumber, >+ borrowernumber => $borrowernumber, > expiration => $patron->debarred, > comment => $patron->debarredcomment, > } >@@ -403,20 +403,20 @@ sub import_patrons { > if ($set_messaging_prefs) { > C4::Members::Messaging::SetMessagingPreferencesFromDefaults( > { >- borrowernumber => $patron->borrowernumber, >+ borrowernumber => $borrowernumber, > categorycode => $patron->categorycode, > } > ); > } > > $imported++; >- push @imported_borrowers, $patron->borrowernumber; #for patronlist >+ push @imported_borrowers, $borrowernumber; #for patronlist > push( > @feedback, > { > feedback => 1, > name => 'lastimported', >- value => $patron->surname . ' / ' . $patron->borrowernumber, >+ value => $patron->surname . ' / ' . $borrowernumber, > } > ); > }); >@@ -461,7 +461,7 @@ sub import_patrons { > lang => $patron->lang || 'default', > tables => { > 'branches' => $patron->branchcode, >- 'borrowers' => $patron->borrowernumber, >+ 'borrowers' => $borrowernumber, > }, > want_librarian => 1, > ) or return; >@@ -469,7 +469,7 @@ sub import_patrons { > my $message_id = EnqueueLetter( > { > letter => $letter, >- borrowernumber => $patron->id, >+ borrowernumber => $borrowernumber, > to_address => $emailaddr, > message_transport_type => 'email' > } >-- >2.39.0
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 32501
: 144732