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:
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
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