]> git.koha-community.org Git - koha.git/commit
Bug 27883: Add ability to preserve patron field from being overwritten by import
authorKyle M Hall <kyle@bywatersolutions.com>
Fri, 5 Mar 2021 14:13:34 +0000 (09:13 -0500)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 12 Jul 2021 13:47:33 +0000 (15:47 +0200)
commit58b5c1a68f5cdad77868abc2f017e180e768fd33
tree8ffd347739fab9c50a72f8dee7a334da5ed6a86b
parenta1bee1b210a635e03de8967bf3cda6de15c320f2
Bug 27883: Add ability to preserve patron field from being overwritten by import

Some libraries would like to be able to preserve particular fields for
existing patrons when overwriting them via the patron import tool.
Effectively, this means the specified columns of the CSV are used for
new patrons, but ignored for existing patrons.

Test Plan:
1) Create a patron CSV with one new patron, make the surname and
   firstname "Test1". Add a cardnumber so we can upload it again later.
2) Import the file
3) Change the firstname and surname in the CSV to "Test2"
4) Return to the patron import tool, choose to match on cardnumber,
   overwrite existing patrons, and preserve exiting firstnames
5) Import the file with these settings
6) Referesh the patron details for this patron, the patron's surname
   should still be "Test" while the firstname should now be "Test2"

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Koha/Patrons/Import.pm
koha-tmpl/intranet-tmpl/prog/en/modules/tools/import_borrowers.tt
misc/import_patrons.pl
t/db_dependent/Koha/Patrons/Import.t
tools/import_borrowers.pl