From 37039c177c8a666c95602504dc222d0601c4f495 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Wed, 30 Dec 2015 15:16:08 -0800 Subject: [PATCH] JBAS-980 repair ind2=z remapping logic (lcgft) Signed-off-by: Bill Erickson --- KCLS/linking/authority_control_fields.pl | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/KCLS/linking/authority_control_fields.pl b/KCLS/linking/authority_control_fields.pl index bce6a37599..9743dd22f4 100755 --- a/KCLS/linking/authority_control_fields.pl +++ b/KCLS/linking/authority_control_fields.pl @@ -562,17 +562,16 @@ my %AUTH_TO_BIB_IND2 = ( 'n' => '4', # Source not specified 'k' => '5', # Canadian Subject Headings 'v' => '6', # Répertoire de vedettes-matière - 'n' => '7', # Source specified in subfield $2 - 'z' => '8' # Other + 'z' => '7' # Source specified in subfield $2 / Other ); -# Maps 6XX subfield $2 values to their equivalent authority leader/11 value. -# These occur when the indicator 2 == 7 ("Source specified in subfield $2") -my %BIB_SF2_TO_AUTH = ( - lcsh => 'a', - mesh => 'c', - nal => 'd', - rvm => 'v' +# Produces a new 6XX ind2 value for values found in subfield $2 when the +# original ind2 value is 7 ("Source specified in subfield $2"). +my %REMAP_BIB_SF2_TO_IND2 = ( + lcsh => '0', + mesh => '2', + nal => '3', + rvm => '6' ); my $start_time = localtime(); @@ -601,14 +600,9 @@ sub find_matching_auth_for_thesaurus { my $thesaurus = $bib_field->subfield('2') || ''; announce("Found local thesaurus value $thesaurus"); - $cfield_ind2 = $BIB_SF2_TO_AUTH{$thesaurus}; - - if (defined $cfield_ind2) { - announce("Mapped local thesaurus '$thesaurus' to '$cfield_ind2'"); - } else { - announce("No mapping found for local thesaurus '$thesaurus'"); - return undef; - } + # if no remapping is found, use 7 == Other. + $cfield_ind2 = $REMAP_BIB_SF2_TO_IND2{$thesaurus} || '7'; + announce("Local thesaurus '$thesaurus' mapped to ind2 value '$cfield_ind2'"); } my $auth_leaders = $e->json_query({ -- 2.11.0