Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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

  • todo

Script for updating such mapping: 

Jira Legacy
serverSystem Jira
columnIdsissuekey,summary,issuetype,created,updated,duedate,assignee,reporter,priority,status,resolution
columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
serverId01505d01-b853-3c2e-90f1-ee9b165564fc
keyMODDICORE-355

Steps:

  1. If library tenant is using default mapping rules with NO changes (no customizations), then call PUT  /mapping-rules/marc-bib/restore endpoint
  2. If library tenant is using default mapping rules, WITH changes (local customization), then follow the next step
    1. Send a GET request to /mapping-rules/marc-bib to retrieve the mapping rules
    2. Under 100, 110, 111, 700, 710, 711, 720 fields update rule for contributor name (section where target = "contributors.name") for the "type" property replace "trim_period, trim" value with "trim_punctuation" value

      before changes:

      Code Block
      languagejs
      collapsetrue
      "rules": [
        {
          "conditions": [
            {
              "type": "trim_period, trim"
            }
          ]
        }
      ]


      after changes:

      Code Block
      linenumberstrue
      collapsetrue
      "rules": [
        {
          "conditions": [
            {
              "type": "trim_punctuation"
            }
          ]
        }
      ]  


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

...

Code Block
languagejs
titleExample of mapping for "720" field with updated 3 "type" properties
collapsetrue
"720": [
    {
      "indicators": {
        "ind1": "1",
        "ind2": "*"
      },
      "entity": [
        {
          "target": "contributors.contributorNameTypeId",
          "description": "Type for Personal Name",
          "applyRulesOnConcatenatedData": true,
          "subfield": [],
          "rules": [
            {
              "conditions": [
                {
                  "type": "set_contributor_name_type_id",
                  "parameter": {
                    "name": "Personal name"
                  }
                }
              ]
            }
          ]
        },
        {
          "target": "contributors.contributorTypeId",
          "description": "Type of contributor",
          "applyRulesOnConcatenatedData": true,
          "subfield": [
            "4",
            "e"
          ],
          "rules": [
            {
              "conditions": [
                {
                  "type": "set_contributor_type_id_by_code_or_name",
                  "parameter": {
                    "contributorCodeSubfield": "4",
                    "contributorNameSubfield": "e"
                  }
                }
              ]
            }
          ],
          "alternativeMapping": {
            "target": "contributors.contributorTypeText",
            "description": "Contributor type free text",
            "ignoreSubsequentSubfields": true,
            "subfield": [
              "e"
            ]
          }
        },
        {
          "target": "contributors.primary",
          "description": "Primary contributor",
          "applyRulesOnConcatenatedData": true,
          "subfield": [
          ],
          "rules": [
            {
              "conditions": [],
              "value": "false"
            }
          ]
        },
        {
          "target": "contributors.name",
          "description": "Personal Name",
          "applyRulesOnConcatenatedData": true,
          "subfield": [
            "a"
          ],
          "rules": [
            {
              "conditions": [
                {
                  "type": "trim_punctuation"
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "indicators": {
        "ind1": " ",
        "ind2": "*"
      },
      "entity": [
        {
          "target": "contributors.contributorNameTypeId",
          "description": "Type for Personal Name",
          "applyRulesOnConcatenatedData": true,
          "subfield": [],
          "rules": [
            {
              "conditions": [
                {
                  "type": "set_contributor_name_type_id",
                  "parameter": {
                    "name": "Personal name"
                  }
                }
              ]
            }
          ]
        },
        {
          "target": "contributors.contributorTypeId",
          "description": "Type of contributor",
          "applyRulesOnConcatenatedData": true,
          "subfield": [
            "4",
            "e"
          ],
          "rules": [
            {
              "conditions": [
                {
                  "type": "set_contributor_type_id_by_code_or_name",
                  "parameter": {
                    "contributorCodeSubfield": "4",
                    "contributorNameSubfield": "e"
                  }
                }
              ]
            }
          ],
          "alternativeMapping": {
            "target": "contributors.contributorTypeText",
            "description": "Contributor type free text",
            "ignoreSubsequentSubfields": true,
            "subfield": [
              "e"
            ]
          }
        },
        {
          "target": "contributors.primary",
          "description": "Primary contributor",
          "applyRulesOnConcatenatedData": true,
          "subfield": [
          ],
          "rules": [
            {
              "conditions": [],
              "value": "false"
            }
          ]
        },
        {
          "target": "contributors.name",
          "description": "Personal Name",
          "applyRulesOnConcatenatedData": true,
          "subfield": [
            "a"
          ],
          "rules": [
            {
              "conditions": [
                {
                  "type": "trim_punctuation"
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "indicators": {
        "ind1": "2",
        "ind2": "*"
      },
      "entity": [
        {
          "target": "contributors.contributorNameTypeId",
          "description": "Type for Corporate Name",
          "applyRulesOnConcatenatedData": true,
          "subfield": [],
          "rules": [
            {
              "conditions": [
                {
                  "type": "set_contributor_name_type_id",
                  "parameter": {
                    "name": "Corporate name"
                  }
                }
              ]
            }
          ]
        },
        {
          "target": "contributors.contributorTypeId",
          "description": "Type of contributor",
          "applyRulesOnConcatenatedData": true,
          "subfield": [
            "4",
            "e"
          ],
          "rules": [
            {
              "conditions": [
                {
                  "type": "set_contributor_type_id_by_code_or_name",
                  "parameter": {
                    "contributorCodeSubfield": "4",
                    "contributorNameSubfield": "e"
                  }
                }
              ]
            }
          ],
          "alternativeMapping": {
            "target": "contributors.contributorTypeText",
            "description": "Contributor type free text",
            "ignoreSubsequentSubfields": true,
            "subfield": [
              "e"
            ]
          }
        },
        {
          "target": "contributors.primary",
          "description": "Primary contributor",
          "applyRulesOnConcatenatedData": true,
          "subfield": [
          ],
          "rules": [
            {
              "conditions": [],
              "value": "false"
            }
          ]
        },
        {
          "target": "contributors.name",
          "description": "Personal Name",
          "applyRulesOnConcatenatedData": true,
          "subfield": [
            "a"
          ],
          "rules": [
            {
              "conditions": [
                {
                  "type": "trim_punctuation"
                }
              ]
            }
          ]
        }
      ]
    }
]

...