From e13661624a320001c479d258c99b4adaad062a01 Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Thu, 10 Apr 2025 15:47:28 +0000 Subject: [PATCH] Bug 39603: Make sure authorised value category is ITEMTYPECAT To test: 1. Add some AVs for ITEMTYPECAT and set some of your item types to be in that Search category. I made one called OTHER 2. Go to the OPAC advanced search page, the item types should be correctly displaying under ITEMTYPECAT with the correct description from ITEMTYPECAT. 3. Create a new AV called OTHER in a different category like 'ERM_AGREEMENT_CLOSURE_REASON'. Make the description something different like 'Wrong description'. 4. Now go back to the OPAC advanced search. 5. Notice your OTHER option now reads 'Wrong description'. 6. APPLY PATCH and restart_all 7. Try again, the OPAC descriptions should now be correct. Signed-off-by: Eric Phetteplace --- C4/Koha.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/C4/Koha.pm b/C4/Koha.pm index d97172e333..b06a4d6078 100644 --- a/C4/Koha.pm +++ b/C4/Koha.pm @@ -101,6 +101,7 @@ sub GetItemTypesCategorized { FROM itemtypes LEFT JOIN authorised_values ON searchcategory = authorised_value WHERE searchcategory > '' and hideinopac=1 + AND category = 'ITEMTYPECAT' UNION SELECT DISTINCT searchcategory AS `itemtype`, COALESCE(authorised_values.lib_opac,authorised_values.lib) AS description, @@ -109,6 +110,7 @@ sub GetItemTypesCategorized { FROM itemtypes LEFT JOIN authorised_values ON searchcategory = authorised_value WHERE searchcategory > '' and hideinopac=0 + AND category = 'ITEMTYPECAT' |; return ( $dbh->selectall_hashref( $query, 'itemtype' ) ); } -- 2.49.0