Closed shelleydoljack closed 1 year ago
The reason ckey 2280808 doesn't show up in the bwchild tsv is because handling the case of a bwchild bib record having more than 1 590 note without a $b is missing from find_bwparents.pl. The unfortunate thing about this particular record, is that the bwchild item records are 2 copies on 1 call segment and we did not handle this case for adding a $b in the update_bwchild_590.pl script:
# split $path_590s_subfieldc file into two groups:
# bwchild ckeys with 1 BW-CHILD item
# bwchild ckeys with more than 1 BW-CHILD item
my $path_590s_subc_1bwchild = "bwchild_590s_subc_1bwchild";
my $path_590s_subc_mbwchild = "bwchild_590s_subc_mbwchild";
system("cat $path_590s_subfieldc | trs selcatalog -iC -oCCS -z'=1' 2> /dev/null | trs selcallnum -iC -c'=1' -oNBZS 2> /dev/null | trs selitem -eBW-CHILD -iN -oCBS -m'~WITHDRAWN' 2> /dev/null > $path_590s_subc_1bwchild");
system("cat $path_590s_subfieldc | trs selcatalog -iC -oCCS -z'>1' 2> /dev/null | trs selcallnum -iC -oNBZS 2> /dev/null | trs selitem -eBW-CHILD -iN -oCBS -m'~WITHDRAWN' 2> /dev/null > $path_590s_subc_mbwchild");
This record matches the first selection if we did not specifically select selcallnum -c'=1'
. If we handled this case here, we might have updated the 590 notes to include the BW-PARENT barcode (there is exactly one for each of these copies). I will add handling for this category of records in the find_bwparents.pl. I'm not sure if we'd be able to update these with the BW-PARENT barcodes.
Fixed find_bwparents.pl and tested against ckeys in bw-child multiple copies tab. Works now. 🤞no more bw problems.
ckey 2280808 has 2 590 fields none with $b item id. It shows up in the marc file ckeys_02250000_02299999.mrc. It should be one of those instance and holdings only records in folio if it were in the bwchild.tsv with barcode as empty string. It is not in folio at all.