From 5459cf061da381c5694f708cfd72946dbb40b522 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Tue, 24 Feb 2026 13:01:50 +0000 Subject: [PATCH] Bug 14962: (QA follow-up) Add date_remove filter to active_display_item active_display_item() was missing a date_remove check, unlike active_display() which correctly excludes expired display items. This method is called from C4::Circulation::AddReturn to decide whether to apply display_return_over logic. Without the filter, items past their date_remove date would still trigger removal logic even though every other part of the system treats them as no longer on display. Sponsored-by: ByWater Solutions Signed-of-by: Martin Renvoize --- Koha/Item.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Koha/Item.pm b/Koha/Item.pm index a5620dc2971..37f00a8950d 100644 --- a/Koha/Item.pm +++ b/Koha/Item.pm @@ -818,7 +818,11 @@ sub active_display_item { -or => [ { 'display.end_date' => undef }, { 'display.end_date' => { '>=' => $dtf->format_date($today) } } - ] + ], + -or => [ + { 'me.date_remove' => undef }, + { 'me.date_remove' => { '>=' => $dtf->format_date($today) } } + ], ] }, { join => 'display' } -- 2.53.0