Bug 17708: Rename 'RENEW' with 'RENEWAL'
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 21 Mar 2017 19:03:11 +0000 (16:03 -0300)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 31 Mar 2017 12:36:17 +0000 (12:36 +0000)
Sounds more appropriate and consistent with existing action logs.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
C4/Circulation.pm
t/db_dependent/Circulation.t

index 16f2dd1..13020ec 100644 (file)
@@ -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;
 }
 
index 2e6e7a9..3a9bd81 100755 (executable)
@@ -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');