Bug 16681 - Allow update of opacnote via batch patron modification tool
authorNick Clemens <nick@bywatersolutions.com>
Thu, 14 Jul 2016 15:45:54 +0000 (11:45 -0400)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 15 Jul 2016 18:07:16 +0000 (18:07 +0000)
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 <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt
tools/modborrowers.pl

index 3887706..54227e6 100644 (file)
                                                 <th>Country</th>
                                                 <th class="title-string">Registration date</th>
                                                 <th class="title-string">Expiry date</th>
+                                                <th>Circulation note</th>
+                                                <th>Opac Note</th>
                                                 [% FOREACH attrh IN attributes_header %]
                                                     <th>[% attrh.attribute %]</th>
                                                 [% END %]
                                                     <td>[% borrower.country %]</td>
                                                     <td><span title="[% borrower.dateenrolled %]">[% borrower.dateenrolled | $KohaDates %]</span></td>
                                                     <td><span title="[% borrower.dateexpiry %]">[% borrower.dateexpiry | $KohaDates %]</span></td>
+                                                    <td>[% borrower.borrowernotes %]</td>
+                                                    <td>[% borrower.opacnote %]</td>
                                                     [% FOREACH pa IN borrower.patron_attributes %]
                                                         [% IF ( pa.code ) %]
                                                             <td>[% pa.code %]=[% pa.value %]</td>
                                                 Expiry date:
                                                 [% CASE 'borrowernotes' %]
                                                 Circulation note:
+                                                [% CASE 'opacnote' %]
+                                                OPAC note:
                                             [% END %]
                                             </label>
                                             [% IF field.mandatory %]
index c776406..6416343 100755 (executable)
@@ -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;