The OPAC version of av-build-dropbox.inc uses av.lib instead of av.lib_opac so even if your AV category has OPAC-friendly text it is not used. I discovered this specifically when using the SUGGEST_FORMAT item types for purchase suggestions. I created the category, added several values, gave them all a concise "lib" value and some a more explanatory "lib_opac" value. When I visited the OPAC's suggestions page /cgi-bin/koha/opac-suggestions.pl?op=add_form I saw the form only used the "lib" values. The code is in koha-tmpl/opac-tmpl/bootstrap/en/includes/av-build-dropbox.inc I suspect many patron-facing AVs don't have lib_opac values because they're not used anywhere, so changing the dropbox code to use lib_opac could have negative side effects for many existing instances. Would it make sense to check if an AV has lib_opac, use that, and default to lib if not available? This should make the transition seamless, unless libraries put inaccurate values in their lib_opac which they wouldn't notice until now.
Well I see why I discovered this on the purchase suggestions, that appears to be the only place the OPAC av-build-dropbox.inc is used. But if this include is used again in the future, it would really be nice if it worked with the lib_opac values. Patch forthcoming.
Created attachment 186901 [details] [review] Bug 40873: AV dropdowns in OPAC don't use lib_opac To test (ktd): - Sign into the admin side - Go to Administration > Authorized Values - Edit or add to SUGGEST_FORMAT such that one AV has a different lib_opac - Sign into the public catalog - Go to purchase suggestions /cgi-bin/koha/opac-suggestions.pl?op=add_form - Note that the AV in the 'Item type' dropdown does not use your lib_opac text - Apply the patch and refresh the page - Now the AV uses the lib_opac text Sponsored-By: California College of the Arts