From 18f6bb87f3eef4cade1a3ea1ec59111bfb39978b Mon Sep 17 00:00:00 2001 From: Laura Escamilla Date: Wed, 27 Mar 2024 19:55:26 +0000 Subject: [PATCH] Bug 36443: Add a fax field / column to the batch patron modification tool MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit To test: 1. Create or modify an existing patron account so that they have a value in their fax number field. 2. Go to Tools > Batch patron modification 1. Add the patron card number, or borrower number into the modification tool and click on continue. There is no option for modifying fax numbers, nor are fax numbers visible in the modification table. 3. Apply the patch and restart_all 4. Repeat step 2 1. A column for ‘Fax’ is now visible after ‘Other phone’ 2. Test the ‘Fax’ field by clearing out the field with the checkbox. ‘Checking the box right next to the label will disable the entry and delete the values of that field on all selected patrons.’ 3. Test the ‘Fax’ field by updating the value with a new number 5. Sign off and have a wonderful day :) Signed-off-by: Owen Leonard Signed-off-by: Tomas Cohen Arazi --- .../prog/en/modules/tools/modborrowers.tt | 3 +++ tools/modborrowers.pl | 13 +++++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt index 9dac594e993..566b9e59ada 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt @@ -254,6 +254,7 @@ Primary email Primary phone Other phone + Fax Registration date Expiry date [% IF CanUpdatePasswordExpiration %] @@ -293,6 +294,7 @@ [% borrower.email | html %] [% borrower.phone | html %] [% borrower.mobile | html %] + [% borrower.fax | html %] [% borrower.dateenrolled | $KohaDates %] [% borrower.dateexpiry | $KohaDates %] [% IF CanUpdatePasswordExpiration %] @@ -351,6 +353,7 @@ [% CASE 'email' %]Primary email: [% CASE 'phone' %]Primary phone: [% CASE 'mobile' %]Other phone: + [% CASE 'fax' %]Fax: [% CASE 'sort1' %]Sort 1: [% CASE 'sort2' %]Sort 2: [% CASE 'dateenrolled' %]Registration date: diff --git a/tools/modborrowers.pl b/tools/modborrowers.pl index 2a6e7c07d84..efe3a62ff64 100755 --- a/tools/modborrowers.pl +++ b/tools/modborrowers.pl @@ -280,6 +280,12 @@ if ( $op eq 'cud-show' ) { mandatory => ( grep /mobile/, @mandatoryFields ) ? 1 : 0, } , + { + name => "fax", + type => "text", + mandatory => ( grep /fax/, @mandatoryFields ) ? 1 : 0, + } + , { name => "sort1", type => @sort1_option ? "select" : "text", @@ -345,10 +351,13 @@ if ( $op eq 'cud-do' ) { my @disabled = $input->multi_param('disable_input'); my $infos; - for my $field ( qw/surname firstname branchcode categorycode streetnumber address address2 city state zipcode country email phone mobile sort1 sort2 dateenrolled dateexpiry password_expiration_date borrowernotes opacnote debarred debarredcomment/ ) { + for my $field ( + qw/surname firstname branchcode categorycode streetnumber address address2 city state zipcode country email phone mobile fax sort1 sort2 dateenrolled dateexpiry password_expiration_date borrowernotes opacnote debarred debarredcomment/ + ) + { my $value = $input->param($field); $infos->{$field} = $value if $value; - $infos->{$field} = "" if grep { $_ eq $field } @disabled; + $infos->{$field} = "" if grep { $_ eq $field } @disabled; } for my $field ( qw( dateenrolled dateexpiry debarred password_expiration_date ) ) { -- 2.44.0