From 271ed2f4027b51328c27df8cc33c89203b0d3b37 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 16 Dec 2025 11:40:25 +0100 Subject: [PATCH] Bug 41451: Prevent 500 when searching hold history It explodes if the "Item type" column is displayed (ie. if AllowHoldItemTypeSelection is set). Test plan: 1) Create at least one hold on any record 2) Navigate to the patron who has the hold and click Holds history in the left menu 3) The table should load correctly and the search bar above it should work 4) In system preferences, enable AllowHoldItemTypeSelection 5) Refresh the holds history, the Requested item type column should now be visible 6) Try a search, a 500 error should be thrown 7) Apply patch 8) Repeat step 5, the search should now work correctly Note that a couple of other bugs will be fixed on follow-up bug reports. Signed-off-by: David Nind --- .../intranet-tmpl/prog/en/modules/members/holdshistory.tt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/holdshistory.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/holdshistory.tt index 3fa944bdcf..909f021204 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/holdshistory.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/holdshistory.tt @@ -298,12 +298,12 @@ }, [% IF show_itemtype_column %] { - data: "item_type.item_type", + data: "item_type", searchable: true, orderable: true, render: function (data, type, row, meta) { if ( row.item_type ) { - return row.item_type.item_type; + return row.item_type; } else { return _("Any item type"); } -- 2.39.5