Uploaded image for project: 'mod-data-export'
  1. mod-data-export
  2. MDEXP-103

Generate MARC bib record - Contributors - conditionally replacing keys with values

    XMLWordPrintable

Details

    • Concorde - Sprint 90
    • 5
    • Concorde

    Description

      Purpose

      FOLIO inventory storage instance contains fields that are represented by keys and those will need to be replaced by their values when generating MARC bib record on the fly. In many cases, which field in MARC record will be populated depends on the value of the key. For contributors, depending on its type the different MARC Bib record field will be populated. Each inventory instance might have a list of contributors and the contributors can be different type (person, corporate entity or meeting) . In addition each type can be defined as primary contributor or not. Depending on this values, different fields will be populated.

      For this user story we will need to get the contributor type based on its id, and then while creating the MARC bib record locate appropriate field and populate it with the value coming from inventory instance record. For example:

      "contributors" : [ {
          "name" : "Torrance, David,",
          "contributorTypeText" : "author.",
          "contributorNameTypeId" : "35b01201-597f-4938-a0d1-110245ba9d67",
          "primary" : true
        } ]
      

      GET /contributor-name-types lists 35b01201-597f-4938-a0d1-110245ba9d67 as "Personal name"
      Since the contributor is primary then the generated MARC record will contain
      100 field with subfield $a containing Torrance, David.

      When it comes to indicators we will need to set indicator1 to equal 1 if the contributor name type is Personal Name and 2 if the contributor name type is Corporate Meeting Name. We leave indicator2 blank.
      As a result our record will look as follow:

      100 1 $a Torrance, David

      For the details of the contributor mappings refer to Recommended MARC mapping spreadsheet: https://docs.google.com/spreadsheets/d/11lGBiPoetHuC3u-onVVLN4Mj5KtVHqJaQe4RqCxgGzo/edit#gid=1166940623 Instance to MARC tab.

      The output should be consistent with parsedRecord.json

      Acceptance criteria

      1. The generated record is short-lived and generated each time it is requested
      2. The record is saved in .mrc file and contains correctly populated data for all contributor types
      3. The indicators are set correctly
      3. Unit tests are written
      4. API tests are updated

      Note: For the MARC record indicator value check: https://docs.google.com/spreadsheets/d/11lGBiPoetHuC3u-onVVLN4Mj5KtVHqJaQe4RqCxgGzo/edit#gid=1410366280 "Concorde - Instance to MARC 2019" tab

      TestRail: Results

        Attachments

          Issue Links

            Activity

              People

                KVupp Kruthi Vuppala
                magdaz Magda Zacharska
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  TestRail: Runs

                    TestRail: Cases