Skip to content
This repository has been archived by the owner on Oct 27, 2023. It is now read-only.

SCC-2271 Fix legacy i field holding parsing #102

Merged
merged 1 commit into from Oct 13, 2020

Conversation

mwbenowitz
Copy link
Contributor

@mwbenowitz mwbenowitz commented Oct 9, 2020

The importing of the Format (e.g. "PRINT") from the holding record comes from the i field, either as a legacy field or from the MARC 843 field. When imported from the legacy field this was being set as an array. This simply corrects that issue and adds a new test.

This does not cause a fatal error but instead for many Format strings to appear in the front end as {"PRINT"} as they are stored as arrays in the PCDM.

This was not caught earlier because the assert.equal call evaluated ['PRINT'] and PRINT as equal. Adding the assert.strictEqual check instead raised the error. This should be carried forward for all new tests written.

The importing of the Format (e.g. "PRINT") from the holding record comes from the `i` field, either as a legacy field or from the MARC `843` field. When imported from the legacy field this was being set as an array. This simply corrects that issue and adds a new test.

This was not caught earlier because the `assert.equal` call evaluated `['PRINT']` and `PRINT` as equal. Adding the `assert.strictEqual` check instead raised the error. This should be carried forward for all new tests written.
@mwbenowitz mwbenowitz merged commit f020906 into development Oct 13, 2020
@mwbenowitz mwbenowitz deleted the SCC-2271-fix-legacy-format-parsing branch October 13, 2020 17:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants