From 5bb4ed9601e3b828317b023ad64219b59faf62b5 Mon Sep 17 00:00:00 2001 From: Julian Maurice Date: Thu, 8 Jan 2026 14:03:25 +0100 Subject: [PATCH] Bug 38666: Make checked out closed stack items holdable --- Koha/Items.pm | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Koha/Items.pm b/Koha/Items.pm index 94f58ff54ea..2c966855fe2 100644 --- a/Koha/Items.pm +++ b/Koha/Items.pm @@ -111,8 +111,11 @@ sub filter_by_for_hold { -or => [ { is_closed_stack => 0 }, { - is_closed_stack => 1, - 'reserves.reserve_id' => { '!=', undef }, + is_closed_stack => 1, + -or => [ + { 'reserves.reserve_id' => { '!=', undef } }, + { 'issue.issue_id' => { '!=', undef } }, + ], }, ], }; @@ -124,7 +127,7 @@ sub filter_by_for_hold { itype => { -not_in => \@hold_not_allowed_itypes }, }, { - join => 'reserves', + join => [ 'issue', 'reserves' ], } ); } else { @@ -134,7 +137,7 @@ sub filter_by_for_hold { 'biblioitem.itemtype' => { -not_in => \@hold_not_allowed_itypes }, }, { - join => [ 'biblioitem', 'reserves' ], + join => [ 'biblioitem', 'issue', 'reserves' ], } ); } -- 2.47.3