sul-dlss / cocina-models

Cocina repository data model (implemented in Ruby)
https://sul-dlss.github.io/cocina-models/
3 stars 0 forks source link

Update descriptive metadata mapping to not attempt to structure table of contents note #687

Closed arcadiafalcone closed 6 months ago

arcadiafalcone commented 6 months ago

Currently the MODS>Cocina mapping parses the separator -- to map a MODS tableOfContents to a cocina note.structuredValue. This process is causing a blank value validation error when the MODS table of contents includes a double separator (-- --). This enhanced parsing is not necessary and should be removed to prevent these errors. Instead of separating the table of contents by -- into a structuredValue, the value as it appears in MODS should map to value.

This is preventing the records from being refreshed to fix the value/parallelValue validation error in https://github.com/sul-dlss/argo/issues/4279.

Corresponding rspec test: https://github.com/sul-dlss/cocina-models/blob/b642e33073aeb0ce87d05a6d447730fc5c8f29ae/spec/cocina/models/mapping/descriptive/mods/table_of_contents_spec.rb#L28

Honeybadger error: https://app.honeybadger.io/projects/50568/faults/104757394/01HRD1D0KSS2GB9G3J6XGP52K5?page=0#notice-trace

Example from: yz568jt0899 MODS <tableOfContents displayLabel="Incomplete contents">ḥeleḳ 1. Be-reshit -- -- ḥeleḳ 3. Ṿa-yiḳra -- ḥeleḳ 4. Ba-midbar</tableOfContents> Cocina { note: [ { value: `ḥeleḳ 1. Be-reshit -- -- ḥeleḳ 3. Ṿa-yiḳra -- ḥeleḳ 4. Ba-midbar`, type: 'table of contents', displayLabel: 'Incomplete contents' } ] }

Other examples: pm606ht7447, pg731bz2048

mjgiarlo commented 6 months ago

This should go out to production with weekly updates on Monday.