From 2e90a02fdd63be5693b481b9bdd08bf0e4c52885 Mon Sep 17 00:00:00 2001 From: Christopher Brannon Date: Fri, 12 Oct 2018 18:45:29 +0000 Subject: [PATCH] Bug 21503: Fix AV to fail to other values To Test (Test both detail.pl and opac-detail.pl for functionality): 1) Apply patch (restart_all) 2) Look up an item that has a shelving location with a description defined (opac description too). 3) Remove opac description from shelving location. Refresh opac-detail.pl and note that description fails back to the regular description. Refresh detail.pl and note no change. 4) Remove regular description from shelving location. Refresh opac-detail.pl and detail.pl. Note that both default to the shelving location code. 5) Remove the shelving location from the LOC table all together. Refresh opac-detail.pl and detail.pl. Note that both default to the requested shelving location code. Signed-off-by: Fridolin Somers Signed-off-by: Jonathan Druart Signed-off-by: Martin Renvoize --- Koha/Template/Plugin/AuthorisedValues.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Koha/Template/Plugin/AuthorisedValues.pm b/Koha/Template/Plugin/AuthorisedValues.pm index 95b0c4c939..b15136e5b7 100644 --- a/Koha/Template/Plugin/AuthorisedValues.pm +++ b/Koha/Template/Plugin/AuthorisedValues.pm @@ -85,8 +85,9 @@ sub GetDescriptionByKohaField { ? $params->{opac} ? $av->{opac_description} : $av->{lib} - : ''; # Maybe we should return $params->{authorised_value}? - + : $params->{authorised_value} + ? $params->{authorised_value} + : '' } 1; -- 2.39.5