@@ -, +, @@ recall --- Koha/Item.pm | 2 +- t/db_dependent/Koha/Item.t | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) --- a/Koha/Item.pm +++ a/Koha/Item.pm @@ -1955,7 +1955,7 @@ sub can_be_waiting_recall { # Check the circulation rule for each relevant itemtype for this item my $rule = Koha::CirculationRules->get_effective_rules({ branchcode => $branchcode, - categorycode => undef, + categorycode => $self->check_recalls ? $self->check_recalls->patron->categorycode : undef, itemtype => $self->effective_itemtype, rules => [ 'recalls_allowed', --- a/t/db_dependent/Koha/Item.t +++ a/t/db_dependent/Koha/Item.t @@ -1705,8 +1705,8 @@ subtest 'Recalls tests' => sub { # Patron2 has Item1 checked out. Patron1 has placed a biblio-level recall on Biblio1, so check if Item1 can fulfill Patron1's recall. Koha::CirculationRules->set_rules({ - branchcode => undef, - categorycode => undef, + branchcode => $branchcode, + categorycode => $patron1->categorycode, itemtype => $item1->effective_itemtype, rules => { recalls_allowed => 0, @@ -1717,8 +1717,8 @@ subtest 'Recalls tests' => sub { is( $item1->can_be_waiting_recall, 0, "Recalls not allowed for this itemtype" ); Koha::CirculationRules->set_rules({ - branchcode => undef, - categorycode => undef, + branchcode => $branchcode, + categorycode => $patron1->categorycode, itemtype => $item1->effective_itemtype, rules => { recalls_allowed => 1, --