From 135121fae67d670481311fd7ebacdf3b41e87808 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. --- C4/Koha.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/C4/Koha.pm b/C4/Koha.pm index d97172e333f..b06a4d6078f 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.39.5