Created attachment 13785 [details] usmarc file to demonstrate the bug Staging a file for import where the item information is in the 952 tag, but lacks home/holding branch information and may have repeated subfields, results in items with no branchcode set and near empty items for the repeated subfields To test: stage and import the attached usmarc file and note that some items, like in the first record, are missing the homebranch and holdingbranch information, and because of the repeated 'z' subfield another item record is created just for the repeated field. Apply patch and stage and import the file again to see that these items are imported correctly. I had to deal with a file from a vendor which had the holdings information in the 952 tag. This was for new books, so there was obviously no itemnumber. There was also no home or holding branch set, so the items got a little lost. To further complicate matter the 'z' subfield was repeated in a couple fields, and MARC::Record seemed to think those repeated subfields should be in a field by themselves. So I have a patch which adds code to watch for this missing home/holding branch subfields, and catches repeated subfields that end up in seperate fields.
Created attachment 13786 [details] [review] Proposed patch for master
I think bug 10877 goes in the same direction as this. *** This bug has been marked as a duplicate of bug 10877 ***