From c8a0e05e396541b020e60c5ff661cf8d34a37f51 Mon Sep 17 00:00:00 2001 From: Fridolin Somers Date: Thu, 6 Feb 2014 14:00:54 +0100 Subject: [PATCH] Bug 11697 - Thesaurus plugin sets indicators with a space When using thesaurus plugin to link a biblio field with an authority, the indicators of the field of authority are set into indicators of biblio field. The bug is that when an indicator is not defined, it contains a space ' '. This space is then set into biblio field. The user must then erase this space before setting the indicator. This patch sets indicator as empty string when containing a space. Test plan : - Create a new biblio record - Select a field managed with a thesaurus. For example 700 - Click on thesaurus plugin icon - Search and choose an authority record with no indicator set on heading field => Without patch, the indicators of the biblio field (ie 700) are filled with a space character => With patch, the indicators of the biblio field (ie 700) are empty - Click on plugin icon - Search and choose an authority record with indicators set on heading field => The indicators are set in biblio field --- authorities/blinddetail-biblio-search.pl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/authorities/blinddetail-biblio-search.pl b/authorities/blinddetail-biblio-search.pl index 7bfe09e..638a8c9 100755 --- a/authorities/blinddetail-biblio-search.pl +++ b/authorities/blinddetail-biblio-search.pl @@ -150,6 +150,10 @@ else { my $tag_number = $index; $tag_number =~ s/^tag_(\d*)_.*$/$1/; +# Indicator contains a space when not defined +$indicator1 = q{} if $indicator1 = q{ }; +$indicator2 = q{} if $indicator2 = q{ }; + $template->param( authid => $authid ? $authid : "", index => $index, -- 1.8.3.2