Bugzilla – Attachment 82869 Details for
Bug 21951
Patron import fails if matching on cardnumber and userid also matches
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21951: Patron import fails if matching on cardnumber and userid also matches
Bug-21951-Patron-import-fails-if-matching-on-cardn.patch (text/plain), 1.65 KB, created by
Owen Leonard
on 2018-12-05 14:35:39 UTC
(
hide
)
Description:
Bug 21951: Patron import fails if matching on cardnumber and userid also matches
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2018-12-05 14:35:39 UTC
Size:
1.65 KB
patch
obsolete
>From 1de89ad0f3cec0ba82352b83481719c0a50bc5b8 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Wed, 5 Dec 2018 08:46:12 -0500 >Subject: [PATCH] Bug 21951: Patron import fails if matching on cardnumber and > userid also matches > >If a patron CSV file has both cardnumber and userid, and cardnumber is >used as a matchpoint, the patron import will fail with an error like >-- >Userid kyle.hall is already used by another patron. >-- >even though that userid is used by the very same patron! > >Matching on userid does not generate this error. > >Test Plan: >1) Generate a patron CSV file where the userid and cardnumber columns > match an existing patron >2) Attempt to overlay existing patron using this CSV file via the > patron import tool >3) Note the "already used" error >4) Apply this patch >5) No error should be generated >6) Modify the cardnumber in the CSV file >7) Attempt to import and overlay again >8) Note you get the userid "already used" error > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >--- > Koha/Patrons/Import.pm | 1 + > 1 file changed, 1 insertion(+) > >diff --git a/Koha/Patrons/Import.pm b/Koha/Patrons/Import.pm >index 712c978..056e312 100644 >--- a/Koha/Patrons/Import.pm >+++ b/Koha/Patrons/Import.pm >@@ -207,6 +207,7 @@ sub import_patrons { > and exists $borrower{userid} > and $borrower{userid} > and not Koha::Patron->new( { userid => $borrower{userid} } )->has_valid_userid >+ and ( (!$borrowernumber) || (Koha::Patrons->find($borrowernumber)->userid ne $borrower{userid}) ) > ) { > push @errors, { duplicate_userid => 1, userid => $borrower{userid} }; > $invalid++; >-- >2.1.4
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 21951
:
82860
| 82869