From ac7215e73f79bc3d8a9b6156d4795d95b004f401 Mon Sep 17 00:00:00 2001 From: Aleisha Amohia Date: Mon, 28 Feb 2022 12:17:04 +1300 Subject: [PATCH] Bug 19532: (follow-up) Fix for wantarray change and title-string Content-Type: text/plain; charset=utf-8 Signed-off-by: Marcel de Rooy --- C4/Overdues.pm | 2 +- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-recalls.tt | 8 ++++---- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt | 8 ++++---- t/db_dependent/Koha/Biblio.t | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/C4/Overdues.pm b/C4/Overdues.pm index 9041bb7e82..9f73166813 100644 --- a/C4/Overdues.pm +++ b/C4/Overdues.pm @@ -260,7 +260,7 @@ sub CalcFine { # check if item has been recalled. recall should have been marked Overdue by cronjob, so only look at overdue recalls # only charge using recall_overdue_fine if there is an item-level recall for this particular item, OR a biblio-level recall - my @recalls = Koha::Recalls->search({ biblionumber => $item->{biblionumber}, old => undef, status => 'O' }); + my @recalls = Koha::Recalls->search({ biblionumber => $item->{biblionumber}, old => undef, status => 'O' })->as_list; my $bib_level_recall = 0; $bib_level_recall = 1 if scalar @recalls > 0; foreach my $recall ( @recalls ) { diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-recalls.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-recalls.tt index 3f3dff0762..4e22c13e0b 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-recalls.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-recalls.tt @@ -35,8 +35,8 @@ Title - Placed on - Expires on + Placed on + Expires on Pickup location Status Due date @@ -55,13 +55,13 @@ [% RECALL.biblio.author | html %] - + Recall date: [% RECALL.recalldate | $KohaDates %] - + [% IF ( RECALL.expirationdate ) %] Expiration: diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt index ebdfc2dbd9..481fecc1a1 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt @@ -756,8 +756,8 @@ Title - Placed on - Expires on + Placed on + Expires on Pickup location Status   @@ -769,13 +769,13 @@ [% INCLUDE 'biblio-title.inc' biblio=RECALL.biblio %] [% IF RECALL.item_level_recall %]

Item recalled: [% RECALL.item.barcode | html %]

[% END %] - + Recall date: [% RECALL.recalldate | $KohaDates %] - + [% IF ( RECALL.expirationdate ) %] Expiration: diff --git a/t/db_dependent/Koha/Biblio.t b/t/db_dependent/Koha/Biblio.t index c55d174b1e..7a467191da 100755 --- a/t/db_dependent/Koha/Biblio.t +++ b/t/db_dependent/Koha/Biblio.t @@ -928,13 +928,13 @@ subtest 'Recalls tests' => sub { item_level_recall => 1 })->store; - my $recalls_count = scalar $biblio->recalls; + my $recalls_count = $biblio->recalls->count; is( $recalls_count, 3, 'Correctly get number of active recalls for biblio' ); $recall1->set_cancelled; $recall2->set_expired({ interface => 'COMMANDLINE' }); - $recalls_count = scalar $biblio->recalls; + $recalls_count = $biblio->recalls->count; is( $recalls_count, 1, 'Correctly get number of active recalls for biblio' ); t::lib::Mocks::mock_preference('UseRecalls', 0); -- 2.20.1