From 8fcb7c11480cf96ffcbd2979aa1e4219337e5de5 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 21 Mar 2017 16:03:11 -0300 Subject: [PATCH] Bug 17708: Rename 'RENEW' with 'RENEWAL' Sounds more appropriate and consistent with existing action logs. Signed-off-by: Jonathan Druart Signed-off-by: Kyle M Hall --- C4/Circulation.pm | 2 +- t/db_dependent/Circulation.t | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 16f2dd1519..13020ec08a 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -2954,7 +2954,7 @@ sub AddRenewal { ); #Log the renewal - logaction("CIRCULATION", "RENEW", $borrowernumber, $itemnumber) if C4::Context->preference("RenewalLog"); + logaction("CIRCULATION", "RENEWAL", $borrowernumber, $itemnumber) if C4::Context->preference("RenewalLog"); return $datedue; } diff --git a/t/db_dependent/Circulation.t b/t/db_dependent/Circulation.t index 2e6e7a9207..3a9bd8183b 100755 --- a/t/db_dependent/Circulation.t +++ b/t/db_dependent/Circulation.t @@ -473,16 +473,16 @@ C4::Context->dbh->do("DELETE FROM accountlines"); ); t::lib::Mocks::mock_preference('RenewalLog', 0); my $date = output_pref( { dt => dt_from_string(), datenonly => 1, dateformat => 'iso' } ); - my $old_log_size = scalar(@{GetLogs( $date, $date, undef,["CIRCULATION"], ["RENEW"]) } ); + my $old_log_size = scalar(@{GetLogs( $date, $date, undef,["CIRCULATION"], ["RENEWAL"]) } ); AddRenewal( $renewing_borrower->{borrowernumber}, $itemnumber7, $branch ); - my $new_log_size = scalar(@{GetLogs( $date, $date, undef,["CIRCULATION"], ["RENEW"]) } ); + my $new_log_size = scalar(@{GetLogs( $date, $date, undef,["CIRCULATION"], ["RENEWAL"]) } ); is ($new_log_size, $old_log_size, 'renew log not added because of the syspref RenewalLog'); t::lib::Mocks::mock_preference('RenewalLog', 1); $date = output_pref( { dt => dt_from_string(), datenonly => 1, dateformat => 'iso' } ); - $old_log_size = scalar(@{GetLogs( $date, $date, undef,["CIRCULATION"], ["RENEW"]) } ); + $old_log_size = scalar(@{GetLogs( $date, $date, undef,["CIRCULATION"], ["RENEWAL"]) } ); AddRenewal( $renewing_borrower->{borrowernumber}, $itemnumber7, $branch ); - $new_log_size = scalar(@{GetLogs( $date, $date, undef,["CIRCULATION"], ["RENEW"]) } ); + $new_log_size = scalar(@{GetLogs( $date, $date, undef,["CIRCULATION"], ["RENEWAL"]) } ); is ($new_log_size, $old_log_size + 1, 'renew log successfully added'); -- 2.39.5