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

Generate MARC bib record - Alternate titles - conditionally replacing keys with values

    XMLWordPrintable

    Details

    • Template:
      MDEXP story template
    • Sprint:
      Firebird Sprint 132
    • Story Points:
      3
    • Development Team:
      Firebird

      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. Each inventory instance might have a list of alternative titles and depending on the alternative title type different fields in the MARC record will be populated.

      For this user story we will need to get the alternative title 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:

      "alternativeTitles": [
          {
            "alternativeTitleTypeId": "3c67693b-f5d4-43fc-8888-2b6a4ee123f3",
            "alternativeTitle": "Portraits and lives"
          }
        ]
      

      GET /alternative-title-types lists 3c67693b-f5d4-43fc-8888-2b6a4ee123f3 as "Variant Title"
      as a result the generated record will contain
      246 field with subfield $a set to "Portraits and lives".

      Note: Only Variant, Former and Uniform titles are in scope for this story

      Alternative title type MARC field First Indicator Second Indicator Subfield Example
      Variant title 246 0 blank $a 246 0  $aAmerican Library Association bulletin
      Former title 247 0 0 $a 246 00 $aJournalism bulletin
      Uniform title 130 0 blank $a 130 0  $aGone with the wind (Motion picture)

      For the details of the alternative title types 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 alternative title types
      3. Variant Title is used to populate the field 246 subfield a (first indicator is set to 0 and second indicator is blank)
      4. Former Title is used to populate the field 247 subfield a (both indicators are set to 0)
      5. Uniform Title is used to populate the field 130 subfield a (first indicator is set to 0 and second indicator is blank)
      6. The other types of the alternate titles are ignored
      7.Unit tests are written
      8. API tests are written

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

        TestRail: Results

          Attachments

          1. add_alternative_titles.PNG
            add_alternative_titles.PNG
            154 kB
          2. export.csv
            0.0 kB
          3. export-1.mrc
            1 kB
          4. fill_titles.PNG
            fill_titles.PNG
            78 kB
          5. marck_record.PNG
            marck_record.PNG
            100 kB

            Issue Links

              Activity

                People

                Assignee:
                Harbuz Aliaksei Harbuz
                Reporter:
                magdaz Magda Zacharska
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    TestRail: Runs

                      TestRail: Cases