From 79453ec394ae46f4c4bcda1a134ceac97f954741 Mon Sep 17 00:00:00 2001 From: Nick Duncan Date: Thu, 5 Nov 2015 13:44:01 -0500 Subject: [PATCH] KMAIN 1911 Auth-to-auth audience linking Authority Records Now Only Link To Other Authority Records With The Same 008/11 (Audience) Signed-off-by: Nick Duncan --- KCLS/linking/authority_authority_linker.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/KCLS/linking/authority_authority_linker.pl b/KCLS/linking/authority_authority_linker.pl index be854b4183..326e216c48 100755 --- a/KCLS/linking/authority_authority_linker.pl +++ b/KCLS/linking/authority_authority_linker.pl @@ -157,6 +157,7 @@ while (my ($src, $links) = $sth->fetchrow_array) { my $src_rec = $e->retrieve_authority_record_entry($src) or die $e->die_event; my $src_marc = MARC::Record->new_from_xml($src_rec->marc); + my $Auth_Source_Indic = substr($src_marc->field('008')->data(), 10, 1); for my $link (split ';', $links) { my ($target, $field_id) = split ',', $link; @@ -167,7 +168,7 @@ while (my ($src, $links) = $sth->fetchrow_array) { die $e->die_event; my $target_marc = MARC::Record->new_from_xml($target_rec->marc); my $cni = $target_marc->field('003')->data; - + my $Auth_Target_Indic = substr($target_marc->field('008')->data(), 10, 1); my $acsaf = get_acsaf($e, $field_id) or die $e->die_event; for my $field ($src_marc->field($acsaf->tag)) { @@ -184,7 +185,7 @@ while (my ($src, $links) = $sth->fetchrow_array) { $tfield, $acsaf->main_entry->display_sf_list, $acsaf->main_entry->joiner ); - if ($target_string eq $src_string) { + if ($target_string eq $src_string and $Auth_Source_Indic eq $Auth_Target_Indic) { print "got a match ...\n" if $options{debug}; $field->update('0' => "($cni)$target"); } -- 2.11.0