Bug 22069: Make log viewer find item renewals
authorMartin Renvoize <martin.renvoize@ptfs-europe.com>
Thu, 25 Apr 2019 13:44:49 +0000 (14:44 +0100)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Thu, 25 Apr 2019 13:46:49 +0000 (14:46 +0100)
Without this patch renewals for checkouts wouldn't
show in the log viewer. The log viewre was using
RENEW, which we use for patrons, but for issue
RENEWAL is used.

The patch adds RENEWAL to the search params, when
Renew was selected in the form, so both terms are
included in the query.

To test:
- Make sure you have RenewalLog turned on
- Make a patron renewal
- Check something out and renew it
- Go to Tools > Log viewer and test different
  searches
  - Modules All - Actions All
  - Modules All - Actions Renew
  - Modules Circulation - Actions Renew
  ...
- Make sure results show as expected

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 3e7b24e023c7c88eb9b1a30308a537de9dcd8682)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt
tools/viewlog.pl

index f46b0a0..6d2f441 100644 (file)
@@ -51,6 +51,7 @@
 [%        CASE 'RESUME' %]Resume
 [%        CASE 'SUSPEND' %]Suspend
 [%        CASE 'RENEW'  %]Renew
+[%        CASE 'RENEWAL'  %]Renew
 [%        CASE 'CHANGE PASS' %]Change password
 [%        CASE 'ADDCIRCMESSAGE' %]Add circulation message
 [%        CASE 'DELCIRCMESSAGE' %]Delete circulation message
index 2f8bc30..4aa7394 100755 (executable)
@@ -103,6 +103,7 @@ if ($do_it) {
 
     my @data;
     my ( $results, $modules, $actions, $interfaces );
+    if ( grep { $_ eq 'RENEW' } @actions ) { push @actions, 'RENEWAL' }; # Circulation uses 'RENEWAL', Patrons uses 'RENEW'
     if ( defined $actions[0] && $actions[0] ne '' ) { $actions  = \@actions; }     # match All means no limit
     if ( $modules[0] ne '' ) { $modules = \@modules; }    # match All means no limit
     if ( defined $interfaces[0] && $interfaces[0] ne '' ) { $interfaces = \@interfaces; }    # match All means no limit