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) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
24e1ee2118
commit
5414d696bc
2 changed files with 3 additions and 0 deletions
|
@ -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"),
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue