From 5a63c5baa23c5f8b1fdd343995f360147f519d4b Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Fri, 26 Apr 2019 14:09:13 -0300 Subject: [PATCH] Bug 15496: (QA follow-up) Fix remaining cases This patch fixes remaining cases of the list => scalar change. To test: - Run: $ kshell k$ prove t/db_dependent/Holds/HoldFulfillmentPolicy.t t/db_dependent/Reserves.t => FAIL: Tests fail - Apply this patch - Run: k$ prove t/db_dependent/Holds/HoldFulfillmentPolicy.t t/db_dependent/Reserves.t => SUCCESS: Tests pass - Sign off :-D Signed-off-by: Tomas Cohen Arazi Signed-off-by: Martin Renvoize Signed-off-by: Nick Clemens --- C4/Circulation.pm | 2 +- t/db_dependent/Holds/HoldFulfillmentPolicy.t | 2 +- t/db_dependent/Reserves.t | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 94e9dfa708..b9ff0f2824 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -1210,7 +1210,7 @@ sub checkHighHolds { # dynamic means X more than the number of holdable items on the record # let's get the items - my @items = $holds->next()->biblio()->items(); + my @items = $holds->next()->biblio()->items()->as_list; # Remove any items with status defined to be ignored even if the would not make item unholdable foreach my $status (@decreaseLoanHighHoldsIgnoreStatuses) { diff --git a/t/db_dependent/Holds/HoldFulfillmentPolicy.t b/t/db_dependent/Holds/HoldFulfillmentPolicy.t index cfc725edf4..42fd5f4fe2 100755 --- a/t/db_dependent/Holds/HoldFulfillmentPolicy.t +++ b/t/db_dependent/Holds/HoldFulfillmentPolicy.t @@ -143,7 +143,7 @@ Koha::Holds->find( $reserve_id )->cancel; t::lib::Mocks::mock_preference( 'UseBranchTransferLimits', '1' ); t::lib::Mocks::mock_preference( 'BranchTransferLimitsType', 'itemtype' ); Koha::Holds->search()->delete(); -my ($item) = Koha::Biblios->find($biblionumber)->items; +my ($item) = Koha::Biblios->find($biblionumber)->items->as_list; my $limit = Koha::Item::Transfer::Limit->new( { toBranch => $library_C, diff --git a/t/db_dependent/Reserves.t b/t/db_dependent/Reserves.t index 214f42250d..27b2701ab6 100755 --- a/t/db_dependent/Reserves.t +++ b/t/db_dependent/Reserves.t @@ -527,7 +527,7 @@ ok( C4::Reserves::IsAvailableForItemLevelRequest($item, $borrower), "Reserving a my $pickup_branch = $builder->build({ source => 'Branch' })->{ branchcode }; t::lib::Mocks::mock_preference( 'UseBranchTransferLimits', '1' ); t::lib::Mocks::mock_preference( 'BranchTransferLimitsType', 'itemtype' ); -my ($item_object) = Koha::Biblios->find($biblionumber)->items; +my ($item_object) = Koha::Biblios->find($biblionumber)->items->as_list; my $limit = Koha::Item::Transfer::Limit->new( { toBranch => $pickup_branch, -- 2.39.5