]> git.koha-community.org Git - koha.git/commit
Bug 26059: Create guarantor/guarantee links on patron import
authorKyle M Hall <kyle@bywatersolutions.com>
Fri, 24 Jul 2020 16:18:44 +0000 (12:18 -0400)
committerFridolin Somers <fridolin.somers@biblibre.com>
Fri, 19 Feb 2021 14:46:22 +0000 (15:46 +0100)
commit5e622fc350809c006af586274cedb5b0a4bd5ff3
tree328b8412c1f39c9c61d21ae1d424089145cc477d
parent75800d9d8fdedc50cd07475294099b42ad17a3ee
Bug 26059: Create guarantor/guarantee links on patron import

The change to allow multiple guarantors was meant to maintain the
ability to import patrons with a Koha patron guarantor, but is not
working as intended.

A) Adding the guarantor simply doesn't work
B) We have two columns named 'relationship', one for the borrowers
table, and one for the guarantor relationships table. This clearly
doesn't work and will cause confusion. The one for the guarantor
relationships table should be renamed.
C) guarantor_firstname and guarantor_surname in the CSV file do nothing
and should be removed.

This patch also fixes a minor issue that causes warnings like:
CGI::param called in list context from
/kohadevbox/koha/tools/import_borrowers.pl line 124

Test Plan:
1) Create a CSV with contents like:
cardnumber,surname,firstname,branchcode,categorycode,guarantor_relationship,guarantor_id
bloop,gloop,froop,MPL,J,father,48
brim,flim,zim,MPL,J,father,48
2) Attempt to upload this file, ensure you have a borrowernumber 48 that
can have guarantors
3) Note the accounts are not linked
4) Apply this patch
5) Restart all the things!
6) Upload the file again
7) The patrons should now be linked!
8) Download the starter CSV file
9) Note the second relationship column is now guarantor_relationship
10) Note the columns guarantor_firstname and guarantor_surname are no longer present

Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com>
Signed-off-by: Marti Fuerst <mfuerst@hmcpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 5cd08373b1eca33ba1b8bd867b6de5d40c0d7242)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Koha/Patrons/Import.pm
tools/import_borrowers.pl