From 09c4417216c32d6af74da193933e95374b0ee7df Mon Sep 17 00:00:00 2001 From: Jacek Ablewicz Date: Tue, 2 Sep 2014 11:46:06 +0200 Subject: [PATCH] Bug 12859 - Patron import tool doesn't import extened attributes values any longer To reproduce: 1/ define/set up extended pattron attribute in administration module, 2/ using "Tools -> Import patrons", try to import some sample patron record[s], having some arbitrary (non-empty) value assigned in 'pattron_attributes' CSV column for attribute defined in step 1/, 3/ observe that extended attribute defined in step 1/ was not imported (not added to the database), without any warnings. This patch restores a small code chunk which went AWOL somewhere around commit b4158f2d2485c9e57bd7f14362b210732bef9d35. To test: 1/ apply patch & retest, 3/ ensure that this issue is no longer reproductible, and there are no apparent regressions of any kind, 4/ make sure that the ability to specify default value for extended attributes added in bug Bug 12716 is still working as intended (= follow up the test plan for bug 12716). Signed-off-by: Petter Goksoyr Asen Patch fixes import of extended patron attributes. Step 1-3 in test plan confirmed. Signed-off-by: Jonathan Druart Signed-off-by: Tomas Cohen Arazi --- tools/import_borrowers.pl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/import_borrowers.pl b/tools/import_borrowers.pl index d99db2fd4e..66d1485372 100755 --- a/tools/import_borrowers.pl +++ b/tools/import_borrowers.pl @@ -62,6 +62,9 @@ my (@errors, @feedback); my $extended = C4::Context->preference('ExtendedPatronAttributes'); my $set_messaging_prefs = C4::Context->preference('EnhancedMessagingPreferences'); my @columnkeys = C4::Members::columns(); +if ($extended) { + push @columnkeys, 'patron_attributes'; +} my $input = CGI->new(); our $csv = Text::CSV->new({binary => 1}); # binary needed for non-ASCII Unicode -- 2.39.5