Bugzilla – Attachment 80804 Details for
Bug 21596
Handle default values when storing Koha::Patron
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21596: Don't set a default of "" for NULL columns during patron import
Bug-21596-Dont-set-a-default-of--for-NULL-columns-.patch (text/plain), 1.30 KB, created by
Nick Clemens
on 2018-10-18 11:17:49 UTC
(
hide
)
Description:
Bug 21596: Don't set a default of "" for NULL columns during patron import
Filename:
MIME Type:
Creator:
Nick Clemens
Created:
2018-10-18 11:17:49 UTC
Size:
1.30 KB
patch
obsolete
>From 70f512853f9c4f6f4e405614caacba79571913ed Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Thu, 18 Oct 2018 11:16:03 +0000 >Subject: [PATCH] Bug 21596: Don't set a default of "" for NULL columns during > patron import > >To test: >1 - dev_install must be set to 1 >2 - prove -v t/db_dependent/Koha/Patrons/Import.t >3 - It fails >4 - Apply patch >5 - It passes >--- > Koha/Patrons/Import.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/Koha/Patrons/Import.pm b/Koha/Patrons/Import.pm >index 1adb32d..bb82dc1 100644 >--- a/Koha/Patrons/Import.pm >+++ b/Koha/Patrons/Import.pm >@@ -128,6 +128,7 @@ sub import_patrons { > push @missing_criticals, { key => $key, line => $., lineraw => $borrowerline }; > } > else { >+ next if grep { $key eq $_ } ('date_renewed','flags','gonenoaddress','lastseen','login_attempts','lost','updated_on','privacy_guarantor_checkouts'); > $borrower{$key} = ''; > } > } >@@ -419,7 +420,6 @@ Returns an array of borrowers' table columns. > > sub set_column_keys { > my ($self, $extended) = @_; >- > my @columnkeys = map { $_ ne 'borrowernumber' ? $_ : () } Koha::Patrons->columns(); > push( @columnkeys, 'patron_attributes' ) if $extended; > >-- >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 21596
:
80804
|
80807
|
80808
|
80809
|
80810
|
80837
|
80838
|
80839
|
80840
|
80844
|
80845
|
80846
|
80847
|
81080
|
81160
|
81537