From dfcaa1d864f8b94bf7450a2726ec1daffccec808 Mon Sep 17 00:00:00 2001 From: Sophie Meynieux Date: Fri, 14 Feb 2014 12:10:32 +0100 Subject: [PATCH] [PASSED QA] Bug 11760 : In notices, code of road type is used instead of description Test plan : - Define a notice containing <> - Trigger an event that generate this notice Without patch <> is replaced by ROADTYPE authorised value code. With the patch it is resplaced by its description This patch needs bug 7372 to be applied Signed-off-by: Kyle M Hall Signed-off-by: Katrin Fischer This works as described, passes tests and QA script. Note: it seems it's not possible currently to use B_streettype from the interface, but it might be worth adding it as a follow up for later use. --- C4/Letters.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/C4/Letters.pm b/C4/Letters.pm index 6709294..5025c10 100644 --- a/C4/Letters.pm +++ b/C4/Letters.pm @@ -23,6 +23,7 @@ use warnings; use MIME::Lite; use Mail::Sendmail; +use C4::Koha qw(GetAuthorisedValueByCode); use C4::Members; use C4::Members::Attributes qw(GetBorrowerAttributes); use C4::Branch; @@ -637,6 +638,7 @@ sub _parseletter { #Therefore adding the test on biblio. This includes biblioitems, #but excludes items. Removed unneeded global and lookahead. + $val = GetAuthorisedValueByCode ('ROADTYPE', $val, 0) if $table=~/^borrowers$/ && $field=~/^streettype$/; my $replacedby = defined ($val) ? $val : ''; ($letter->{title} ) and do { $letter->{title} =~ s/$replacetablefield/$replacedby/g; -- 1.8.3.2