From: Alan Jack Pippin Date: Mon, 11 Sep 2006 03:37:32 +0000 (-0600) Subject: Fixed bug related to preferred name mismatches with hometeaching family name. X-Git-Tag: release_0_1_0~47 X-Git-Url: http://git.pippins.net/embedvideo/.git/%22%22.%24thumbnail.%22/%7Bview%7D?a=commitdiff_plain;h=d79ef1cbbfcc523bdac49bdbdf61b6bae43da00b;p=eq%2F.git Fixed bug related to preferred name mismatches with hometeaching family name. --- diff --git a/import_ward_data b/import_ward_data index d54f8fc..da23ae4 100755 --- a/import_ward_data +++ b/import_ward_data @@ -401,8 +401,11 @@ sub update_eq_family_table $hashref = $hometeaching_data{$index}; foreach $key (keys %$hashref) { if($hometeaching_data{$index}{'Household'} =~ /(\S+)\s+(\S+),\s+(\S+)\s+(.*)/) { - print "I: Adjusting hometeaching match from: $hometeaching_data{$index}{'Household'} to $1, $3 $4\n"; - $hometeaching_data{$index}{'Household'} = "$1, $3 $4"; + $a = $1; $b = $2; $c = $3; $d = $4; + if($family_name =~ /$a/ && $hometeaching_data{$index}{'Household'} !~ /$family_name/i) { + print "I: Adjusting hometeaching match from: $hometeaching_data{$index}{'Household'} to $a, $c $d\n"; + $hometeaching_data{$index}{'Household'} = "$a, $c $d"; + } } if($key =~ /Quorum/i && $hometeaching_data{$index}{$key} =~ /Elders/i &&