From e47d53f75693e04cc96d9e4de1f6b88a92ccf479 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Thu, 14 Jul 2016 11:45:54 -0400 Subject: [PATCH] Bug 16681 - Allow update of opacnote via batch patron modification tool MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit To test: 1 - Select a batch of patrons (via list, saved file, and cardnumber entry) 2 - Verify you cannot edit 'opacnotes' field, nor can you see 'borrowernotes' field in table, though you can edit it 3 - Verify editing works as expected 4 - Apply patch 5 - Select a batch via each method as above 6 - Note both note columns display in table 7 - Note that you can edit or clear the opacnotes field as expected 8 - Verify other feautres work as previously Sponsored by: Lancaster Theological Seminary (https://lancasterseminary.edu/) Followed test plan, works as expected. Signed-off-by: Marc VĂ©ron --- koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt | 6 ++++++ tools/modborrowers.pl | 8 +++++++- 2 files changed, 13 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 51775a2..a9efac8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt @@ -239,6 +239,8 @@ Country Registration date Expiry date + Circulation note + Opac Note [% FOREACH attrh IN attributes_header %] [% attrh.attribute %] [% END %] @@ -261,6 +263,8 @@ [% borrower.country %] [% borrower.dateenrolled | $KohaDates %] [% borrower.dateexpiry | $KohaDates %] + [% borrower.borrowernotes %] + [% borrower.opacnote %] [% FOREACH pa IN borrower.patron_attributes %] [% IF ( pa.code ) %] [% pa.code %]=[% pa.value %] @@ -315,6 +319,8 @@ Expiry date: [% CASE 'borrowernotes' %] Circulation note: + [% CASE 'opacnote' %] + OPAC note: [% END %] [% IF field.mandatory %] diff --git a/tools/modborrowers.pl b/tools/modborrowers.pl index c776406..6416343 100755 --- a/tools/modborrowers.pl +++ b/tools/modborrowers.pl @@ -247,6 +247,12 @@ if ( $op eq 'show' ) { type => "text", mandatory => ( grep /borrowernotes/, @mandatoryFields ) ? 1 : 0, } + , + { + name => "opacnote", + type => "text", + mandatory => ( grep /opacnote/, @mandatoryFields ) ? 1 : 0, + } ); $template->param('patron_attributes_codes', \@patron_attributes_codes); @@ -260,7 +266,7 @@ if ( $op eq 'do' ) { my @disabled = $input->multi_param('disable_input'); my $infos; - for my $field ( qw/surname firstname branchcode categorycode city state zipcode country sort1 sort2 dateenrolled dateexpiry borrowernotes/ ) { + for my $field ( qw/surname firstname branchcode categorycode city state zipcode country sort1 sort2 dateenrolled dateexpiry borrowernotes opacnote/ ) { my $value = $input->param($field); $infos->{$field} = $value if $value; $infos->{$field} = "" if grep { /^$field$/ } @disabled; -- 1.7.10.4