From 6a551295629098c5fc0f86174d98c81cb2c87524 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Mon, 18 Jul 2022 18:39:51 -0300 Subject: [PATCH] Bug 31183: Use filter_by_current in Koha::Holds->get_items_that_can_fill This patch makes the method use the new Koha::Item::Transfers->filter_by_current one. To test: 1. Run: $ kshell k$ prove t/db_dependent/Koha/Holds.t => SUCCESS: Tests pass 2. Apply this patch 3. Repeat 1 => SUCCESS: Tests still pass 4. Sign off :-D Signed-off-by: Tomas Cohen Arazi Signed-off-by: Michal Urban Signed-off-by: Jonathan Druart --- Koha/Holds.pm | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/Koha/Holds.pm b/Koha/Holds.pm index 4ff90e679ed..c5bfc55df38 100644 --- a/Koha/Holds.pm +++ b/Koha/Holds.pm @@ -120,12 +120,7 @@ sub get_items_that_can_fill { push @bibs_or_items, 'me.itemnumber' => { in => \@itemnumbers } if @itemnumbers; push @bibs_or_items, 'me.biblionumber' => { in => \@biblionumbers } if @biblionumbers; - my @branchtransfers = Koha::Item::Transfers->search( - { - datearrived => undef, - datecancelled => undef, - }, - { + my @branchtransfers = Koha::Item::Transfers->filter_by_current->search({}, { columns => ['itemnumber'], collapse => 1, } -- 2.25.1