From 4ba478759e16fa210d61280bfe71be946483ff50 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=utf8 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 Signed-off-by: Jonathan Druart Signed-off-by: Kyle M Hall (cherry picked from commit 81a9e7c88ee44fdfdd2f4f19b52150ce7176b1b7) Signed-off-by: Frédéric Demians --- .../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 388770691a..54227e66e2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt @@ -250,6 +250,8 @@ Country Registration date Expiry date + Circulation note + Opac Note [% FOREACH attrh IN attributes_header %] [% attrh.attribute %] [% END %] @@ -272,6 +274,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 %] @@ -326,6 +330,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 c776406a90..6416343f82 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; -- 2.39.5