From b415a676f1a22b51fc89d35ea459ffa88b908706 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Thu, 25 Apr 2019 14:44:49 +0100 Subject: [PATCH] Bug 22069: Make log viewer find item renewals 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 Signed-off-by: Chris Cormack Signed-off-by: Nick Clemens (cherry picked from commit 3e7b24e023c7c88eb9b1a30308a537de9dcd8682) Signed-off-by: Martin Renvoize --- koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt | 1 + tools/viewlog.pl | 1 + 2 files changed, 2 insertions(+) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt index f46b0a026d..6d2f4411ed 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt @@ -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 diff --git a/tools/viewlog.pl b/tools/viewlog.pl index 2f8bc30e3e..4aa7394d56 100755 --- a/tools/viewlog.pl +++ b/tools/viewlog.pl @@ -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 -- 2.39.5