From 0df2d94dfaa6642874bb0d79e009999e55013b46 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Wed, 15 Oct 2025 13:29:54 +0200 Subject: [PATCH] Bug 41024: Unify spelling of BorrowersLog, keep plural form The singular form is wrong and only exists in textual context. This is a result of git grep | xargs sed. Test plan: Read the patch. git grep BorrowerLog Signed-off-by: Marcel de Rooy Signed-off-by: Aleisha Amohia Signed-off-by: Lucas Gass (cherry picked from commit 4a267d0e9b6601c55a36a9de0a5d8f9b36fa7a20) Signed-off-by: Paul Derscheid (cherry picked from commit f59d8c46e3df68ca6c1ddcc06288c89406ce9156) Signed-off-by: Fridolin Somers --- misc/release_notes/release_notes_19_11_00.html | 2 +- misc/release_notes/release_notes_19_11_00.md | 2 +- t/db_dependent/Koha/Patrons.t | 14 +++++++------- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/misc/release_notes/release_notes_19_11_00.html b/misc/release_notes/release_notes_19_11_00.html index e65a499a21..43b6a290ab 100644 --- a/misc/release_notes/release_notes_19_11_00.html +++ b/misc/release_notes/release_notes_19_11_00.html @@ -1366,7 +1366,7 @@ have already been fixed in maintainance releases)

Sponsored by Goethe-Institut

  • [21939] Permission for holds history tab is too strict

  • -
  • [22741] Koha::Patron->store must not log updated_on changes (random failure of test BorrowerLogs and TrackLastPatronActivity)
  • +
  • [22741] Koha::Patron->store must not log updated_on changes (random failure of test BorrowersLog and TrackLastPatronActivity)
  • [22910] Unique attributes should not be copied when duplicating a patron
  • [22944] avoid AnonymousPatron in search_patrons_to_anonymise
  • [23077] Can't import patrons without cardnumber
  • diff --git a/misc/release_notes/release_notes_19_11_00.md b/misc/release_notes/release_notes_19_11_00.md index cbb84971bc..91cfe43102 100644 --- a/misc/release_notes/release_notes_19_11_00.md +++ b/misc/release_notes/release_notes_19_11_00.md @@ -1104,7 +1104,7 @@ have already been fixed in maintainance releases) **Sponsored by** *Goethe-Institut* - [[21939]](http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21939) Permission for holds history tab is too strict -- [[22741]](http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22741) Koha::Patron->store must not log updated_on changes (random failure of test BorrowerLogs and TrackLastPatronActivity) +- [[22741]](http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22741) Koha::Patron->store must not log updated_on changes (random failure of test BorrowersLog and TrackLastPatronActivity) - [[22910]](http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22910) Unique attributes should not be copied when duplicating a patron - [[22944]](http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22944) avoid AnonymousPatron in search_patrons_to_anonymise - [[23077]](http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23077) Can't import patrons without cardnumber diff --git a/t/db_dependent/Koha/Patrons.t b/t/db_dependent/Koha/Patrons.t index 994d3fe409..7da75dae94 100755 --- a/t/db_dependent/Koha/Patrons.t +++ b/t/db_dependent/Koha/Patrons.t @@ -408,7 +408,7 @@ subtest 'renew_account' => sub { my $retrieved_expiry_date = Koha::Patrons->find( $patron->{borrowernumber} )->dateexpiry; is( dt_from_string($retrieved_expiry_date), $a_year_later_minus_a_month, "$a_month_ago + 12 months must be $a_year_later_minus_a_month" ); my $number_of_logs = $schema->resultset('ActionLog')->search( { module => 'MEMBERS', action => 'RENEW', object => $retrieved_patron->borrowernumber } )->count; - is( $number_of_logs, 1, 'With BorrowerLogs, Koha::Patron->renew_account should have logged' ); + is( $number_of_logs, 1, 'With BorrowersLog, Koha::Patron->renew_account should have logged' ); t::lib::Mocks::mock_preference( 'BorrowerRenewalPeriodBase', 'now' ); t::lib::Mocks::mock_preference( 'BorrowersLog', 0 ); @@ -419,7 +419,7 @@ subtest 'renew_account' => sub { $retrieved_expiry_date = $retrieved_patron->dateexpiry; is( dt_from_string($retrieved_expiry_date), $a_year_later, "today + 12 months must be $a_year_later" ); $number_of_logs = $schema->resultset('ActionLog')->search( { module => 'MEMBERS', action => 'RENEW', object => $retrieved_patron->borrowernumber } )->count; - is( $number_of_logs, 1, 'Without BorrowerLogs, Koha::Patron->renew_account should not have logged' ); + is( $number_of_logs, 1, 'Without BorrowersLog, Koha::Patron->renew_account should not have logged' ); t::lib::Mocks::mock_preference( 'BorrowerRenewalPeriodBase', 'combination' ); $expiry_date = $retrieved_patron_2->renew_account; @@ -508,7 +508,7 @@ subtest "delete" => sub { is( Koha::Patron::Modifications->search( { borrowernumber => $patron->borrowernumber } )->count, 0, q|Koha::Patron->delete should have deleted patron's modifications| ); my $number_of_logs = $schema->resultset('ActionLog')->search( { module => 'MEMBERS', action => 'DELETE', object => $patron->borrowernumber } )->count; - is( $number_of_logs, 1, 'With BorrowerLogs, Koha::Patron->delete should have logged' ); + is( $number_of_logs, 1, 'With BorrowersLog, Koha::Patron->delete should have logged' ); # Test deletion with designated fallback owner my $designated_owner = $builder->build_object({ class => 'Koha::Patrons' }); @@ -1771,12 +1771,12 @@ subtest 'BorrowersLog tests' => sub { my $log_info = from_json( $logs[0]->info ); is( $log_info->{cardnumber}->{after}, 'TESTCARDNUMBER', 'Got correct new cardnumber' ); is( $log_info->{cardnumber}->{before}, $cardnumber, 'Got correct old cardnumber' ); - is( scalar @logs, 1, 'With BorrowerLogs, one detailed MODIFY action should be logged for the modification.' ); + is( scalar @logs, 1, 'With BorrowersLog, one detailed MODIFY action should be logged for the modification.' ); t::lib::Mocks::mock_preference( 'TrackLastPatronActivityTriggers', 'connection' ); $patron->update_lastseen('connection'); @logs = $schema->resultset('ActionLog')->search( { module => 'MEMBERS', action => 'MODIFY', object => $patron->borrowernumber } ); - is( scalar @logs, 1, 'With BorrowerLogs and TrackLastPatronActivityTriggers we should not spam the logs'); + is( scalar @logs, 1, 'With BorrowersLog and TrackLastPatronActivityTriggers we should not spam the logs'); Koha::ActionLogs->search()->delete(); $patron->get_from_storage(); @@ -2156,7 +2156,7 @@ subtest '->set_password' => sub { is( $patron->login_attempts, 0, 'Login attemps have been reset' ); my $number_of_logs = $schema->resultset('ActionLog')->search( { module => 'MEMBERS', action => 'CHANGE PASS', object => $patron->borrowernumber } )->count; - is( $number_of_logs, 0, 'Without BorrowerLogs, Koha::Patron->set_password doesn\'t log password changes' ); + is( $number_of_logs, 0, 'Without BorrowersLog, Koha::Patron->set_password doesn\'t log password changes' ); # Enable logging password changes t::lib::Mocks::mock_preference( 'BorrowersLog', 1 ); @@ -2168,7 +2168,7 @@ subtest '->set_password' => sub { object => $patron->borrowernumber } )->count; - is( $number_of_logs, 1, 'With BorrowerLogs, Koha::Patron->set_password does log password changes' ); + is( $number_of_logs, 1, 'With BorrowersLog, Koha::Patron->set_password does log password changes' ); # add other action name $patron->set_password( { password => 'abcd b2', action => 'RESET PASS' } ); $number_of_logs = $schema->resultset('ActionLog')->search(