Bugzilla – Attachment 158486 Details for
Bug 35264
Update patron import to use protected column
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35264: Add "protected" column to patron import
Bug-35264-Add-protected-column-to-patron-import.patch (text/plain), 2.30 KB, created by
David Cook
on 2023-11-06 05:36:01 UTC
(
hide
)
Description:
Bug 35264: Add "protected" column to patron import
Filename:
MIME Type:
Creator:
David Cook
Created:
2023-11-06 05:36:01 UTC
Size:
2.30 KB
patch
obsolete
>From 531b312a5f54a469f19faddfccb0972171cca087 Mon Sep 17 00:00:00 2001 >From: David Cook <dcook@prosentient.com.au> >Date: Mon, 6 Nov 2023 05:31:29 +0000 >Subject: [PATCH] Bug 35264: Add "protected" column to patron import > >This change adds the "protected" column to patron import. > >Test plan: >0. Apply the patch and run "restart_all" >1. prove -v t/db_dependent/Koha/Patrons/Import.t >2. Go to http://localhost:8081/cgi-bin/koha/tools/import_borrowers.pl >3. Note "protected" is listed in the "fields you want to supply" >on the right side of the screen >4. Note "protected" appears in file downloaded by clicking >"Download a Starter CSV file with all the columns" >5. Note that "Protected" appears after clicking "Enter default values" >and after clicking "Preserve existing values" > >6. For bonus marks, use the "Starter CSV file" to import a test patron >(remember surname, branchcode, and categorycode are the required fields) >--- > Koha/Database/Columns.pm | 1 + > Koha/Patrons/Import.pm | 2 ++ > 2 files changed, 3 insertions(+) > >diff --git a/Koha/Database/Columns.pm b/Koha/Database/Columns.pm >index f5c45af5de..4637d0cab3 100644 >--- a/Koha/Database/Columns.pm >+++ b/Koha/Database/Columns.pm >@@ -180,6 +180,7 @@ sub columns { > "privacy_guarantor_fines" => __("Show fines to guarantor"), > "privacy" => __("Privacy settings"), > "pronouns" => __("Pronouns"), >+ "protected" => __("Protected"), > "relationship" => __("Relationship"), > "secret" => __("Secret (2FA)"), > "sex" => __("Gender"), >diff --git a/Koha/Patrons/Import.pm b/Koha/Patrons/Import.pm >index b1c751007e..d6e0846cad 100644 >--- a/Koha/Patrons/Import.pm >+++ b/Koha/Patrons/Import.pm >@@ -146,6 +146,8 @@ sub import_patrons { > $borrower{cardnumber} = undef if $borrower{cardnumber} eq ""; > $borrower{auth_method} = undef if $borrower{auth_method} eq ""; > >+ $borrower{protected} = 0 unless $borrower{protected}; >+ > # Check if borrower category code exists and if it matches to a known category. Pushing error to missing_criticals otherwise. > $self->check_borrower_category($borrower{categorycode}, $borrowerline, $line_number, \@missing_criticals); > >-- >2.34.1
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 35264
:
158486
|
158494