From aad86da180205e86c3c5f71f7813180d534f8754 Mon Sep 17 00:00:00 2001 From: Aleisha Amohia Date: Fri, 11 Oct 2024 01:53:11 +0000 Subject: [PATCH] Bug 38148: Check value of holdallowed circ rule properly To test: 1. Search for a record on the OPAC. Notice there is no link to place a hold. 2. Search for this record on the staff interface and place a hold. Go to Circulation -> Holds to pull and notice it is empty 3. Apply patch and restart services 4. Search for a record on the OPAC. Confirm you can see a link to place a hold. 5. Search for this record on the staff interface and place a hold. Go to Circulation -> Holds to pull and confirm your hold shows in the list. Sponsored-by: Whanganui District Council --- Koha/Items.pm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Koha/Items.pm b/Koha/Items.pm index 1676a875970..8ef9f6f038e 100644 --- a/Koha/Items.pm +++ b/Koha/Items.pm @@ -61,14 +61,16 @@ placing a hold on one of those items. sub filter_by_for_hold { my ($self) = @_; - my $default_rule = Koha::CirculationRules->get_effective_rule( + my $default_rule = Koha::CirculationRules->get_effective_rule_value( { rule_name => 'holdallowed', - rule_value => 'not_allowed', + itemtype => undef, + branchcode => undef, + categorycode => undef, } ); my @hold_not_allowed_itypes; - if ($default_rule) { + if ($default_rule eq 'not_allowed') { @hold_not_allowed_itypes = Koha::ItemTypes->search->get_column('itemtype'); my @hold_allowed_itypes = Koha::CirculationRules->search( { -- 2.39.5