From 28b155ca1e33832f9aebc7aa6937fbe2f0e2f54c Mon Sep 17 00:00:00 2001 From: Agustin Moyano Date: Mon, 29 Apr 2019 23:07:28 -0300 Subject: [PATCH] Bug 22284: (follow-up) Default to circulation control branch when no hold libraries are found Signed-off-by: Josef Moravec Signed-off-by: Liz Rea Signed-off-by: Tomas Cohen Arazi Signed-off-by: Martin Renvoize --- Koha/Item.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Koha/Item.pm b/Koha/Item.pm index 090826de31..c4033fe521 100644 --- a/Koha/Item.pm +++ b/Koha/Item.pm @@ -326,6 +326,8 @@ sub pickup_locations { if ($branchitemrule->{hold_fulfillment_policy} eq 'holdgroup') { @libs = $library->get_hold_libraries; + my $circ_control_library = Koha::Libraries->find($circ_control_branch); + push @libs, $circ_control_library unless scalar(@libs) > 0; } elsif ($branchitemrule->{hold_fulfillment_policy} eq 'homebranch') { push @libs, $self->home_branch; } elsif ($branchitemrule->{hold_fulfillment_policy} eq 'holdingbranch') { -- 2.39.5