Update of mapping to correct handling of repeated classification fields and subfields

Update of mapping to correct handling of repeated classification fields and subfields

MODDICORE-323: Problems with default MARC-Instance mapping when some call number fields are repeated or have repeated subfieldsClosed

Update to the default MARC Bib-to-Inventory Instance MAP:

  • Update mapping rules for the classification field in order to create separate entities per subfield 'a'

Update script: MODSOURMAN-1052: Create script to update mapping rules for the classification fieldClosed

Steps:

  1. If library tenant is using default mapping rules with NO changes (no customizations), then call PUT  /mapping-rules/marc-bib/restore

  2. If library tenant is using default mapping rules, WITH changes (local customization), then follow the next steps:

Expected result:

  • Before changes:

    "050": [ { "entity": [ { "target": "classifications.classificationTypeId", "description": "Type for LC classification", "applyRulesOnConcatenatedData": true, "subfield": [ "a", "b" ], "rules": [ { "conditions": [ { "type": "set_classification_type_id", "parameter": { "name": "LC" } } ] } ] }, { "target": "classifications.classificationNumber", "description": "LC classification", "applyRulesOnConcatenatedData": true, "subfield": [ "a", "b" ] } ] } ]
  • After changes: 

    "050": [ { "entityPerRepeatedSubfield": true, "entity": [ { "target": "classifications.classificationTypeId", "description": "Type for LC classification", "subfield": [ "a" ], "rules": [ { "conditions": [ { "type": "set_classification_type_id", "parameter": { "name": "LC" } } ] } ] }, { "target": "classifications.classificationNumber", "description": "LC classification", "subfield": [ "a" ], "rules": [ { "conditions": [ { "type": "concat_subfields_by_name", "parameter": { "subfieldsToConcat": [ "b" ] } } ] } ] } ] } ]

       

  • Send PUT request to /mapping-rules/marc-bib and put in the body the updated JSON