From c5886b18ed9359922cb2b285381003003d552723 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 :) --- .../intranet-tmpl/prog/en/modules/tools/modborrowers.tt | 3 +++ tools/modborrowers.pl | 8 +++++++- 2 files changed, 10 insertions(+), 1 deletion(-) 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 9dac594e99..566b9e59ad 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 2a6e7c07d8..bc12c259e5 100755 --- a/tools/modborrowers.pl +++ b/tools/modborrowers.pl @@ -279,6 +279,12 @@ if ( $op eq 'cud-show' ) { type => "text", mandatory => ( grep /mobile/, @mandatoryFields ) ? 1 : 0, } + , + { + name => "fax", + type => "text", + mandatory => ( grep /fax/, @mandatoryFields ) ? 1 : 0, + } , { name => "sort1", @@ -345,7 +351,7 @@ 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; -- 2.30.2