Bug 21465: Don't throw duplicate userid error if userid belongs to the matched patron
authorNick Clemens <nick@bywatersolutions.com>
Tue, 2 Oct 2018 19:48:02 +0000 (19:48 +0000)
committerLucas Gass <lucas@bywatersolutions.com>
Sat, 22 Dec 2018 16:29:08 +0000 (16:29 +0000)
commit4262486ef33b30ec0a88428a9a73b688f30ac935
treec290e96bfa46f9723a936577eb1def816081ec46
parent247b57388a168b358878c1acd50b8591a3335808
Bug 21465: Don't throw duplicate userid error if userid belongs to the matched patron

To test:
 1 - Export your patrons
    a - Create a report 'SELECT * FROM borrowers'
    b - Run and save the report as csv (check your delimiter)
    c - Delete the borrowernumebr column
 2 - Use the Patron Import tool to import the csv from above
 3 - Set matching to 'cardnumber'
 4 - Set 'If matching record is already in the borrowers table:' to
Overwrite
 5 - Import
 6 - None are import because of matchign userid (their own)
 7 - Apply patch
 8 - Repeat
 9 - Patrons are successfully overwritten
10 - prove -v t/db_dependent/Koha/Patrons/Import.t
11 - prove -v t/db_dependent/Koha/Patrons.t

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 9a2bd027e5d2380b39776059066d8f06b42d68dd)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 2e3da710f4cbf85e5a13f3723047202517afb99d)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Koha/Patrons/Import.pm
t/db_dependent/Koha/Patrons.t
t/db_dependent/Koha/Patrons/Import.t