Bug 23916: (QA follow-up) Remove stray changes and fix typo
authorNick Clemens <nick@bywatersolutions.com>
Sat, 24 Oct 2020 02:56:15 +0000 (02:56 +0000)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 10 Nov 2020 14:00:14 +0000 (15:00 +0100)
There were a couple changes that had no effect, so cleaned those up

Typo 'is' for 'if'

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
C4/Circulation.pm
Koha/Patrons.pm
t/db_dependent/Koha/Checkouts.t

index 925c6f7..f0b8dc4 100644 (file)
@@ -1522,7 +1522,7 @@ sub AddIssue {
 
             # Get ID of logged in user.  if called from a batch job,
             # no user session exists and C4::Context->userenv() returns
-            # the scalar '0'. Only do this is the syspref says so
+            # the scalar '0'. Only do this if the syspref says so
             if ( C4::Context->preference('RecordStaffUserOnCheckout') ) {
                 my $userenv = C4::Context->userenv();
                 my $usernumber = (ref($userenv) eq 'HASH') ? $userenv->{'number'} : undef;
index a958200..3b3b4b1 100644 (file)
@@ -195,9 +195,7 @@ sub anonymise_issue_history {
         }
         );
         my $anonymous_patron = C4::Context->preference('AnonymousPatron') || undef;
-        $nb_rows += $old_issues_to_anonymise->update( {
-            'old_issues.borrowernumber' => $anonymous_patron
-        } );
+        $nb_rows += $old_issues_to_anonymise->update( { 'old_issues.borrowernumber' => $anonymous_patron } );
     }
     return $nb_rows;
 }
index 01c97bb..246a986 100755 (executable)
@@ -94,9 +94,6 @@ subtest 'item' => sub {
     is( $item->itemnumber, $item_1->itemnumber, 'Koha::Checkout->item should return the correct item' );
 };
 
-$retrieved_checkout_1->delete;
-is( Koha::Checkouts->search->count, $nb_of_checkouts + 1, 'Delete should have deleted the checkout' );
-
 subtest 'patron' => sub {
     plan tests => 3;
     my $patron = $builder->build_object({class=>'Koha::Patrons', value => {branchcode => $library->{branchcode}}});
@@ -125,6 +122,9 @@ subtest 'patron' => sub {
     );
 };
 
+$retrieved_checkout_1->delete;
+is( Koha::Checkouts->search->count, $nb_of_checkouts + 1, 'Delete should have deleted the checkout' );
+
 subtest 'issuer' => sub {
     plan tests => 3;
     my $patron = $builder->build_object({class=>'Koha::Patrons', value => {branchcode => $library->{branchcode}}});