Required controlledVocabulary metadata marked as valid while empty#12345
Required controlledVocabulary metadata marked as valid while empty#12345stevenwinship wants to merge 5 commits intodevelopfrom
Conversation
This comment has been minimized.
This comment has been minimized.
0d3fd19 to
4880feb
Compare
|
2026-04-22: @ErykKul we're returning this PR back to you for further fixes. |
This comment has been minimized.
This comment has been minimized.
4880feb to
1528236
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
📦 Pushed preview images as 🚢 See on GHCR. Use by referencing with full name as printed above, mind the registry name. |
|
Root cause: allowHarvestingMissingCVV was gating the sanitizer, but it should only affect the parser. The parser uses the flag to decide whether to throw on an unmappable controlled vocabulary string. The sanitizer handles a different case: required controlled vocabulary fields that come up empty after initDatasetFields() because the source format (e.g. oai_dc) does not carry them. Those fields must always be filled with a proper ControlledVocabularyValue wrapping "N/A", not a plain "N/A" string, otherwise the second validation pass still fails. The fix removes the gate and routes by field type instead. Controlled vocabulary fields get a ControlledVocabularyValue("N/A"), other fields get setSingleValue("N/A"). With that, allowHarvestingMissingCVV=false correctly imports 7 of 8 records: the parser rejects the 1 record with a bad controlled vocabulary string, and the sanitizer rescues the 7 records with empty controlled vocabulary fields. |
What this PR does / why we need it: Previous PR caused post merge test failures in Jenkins. This PR includes the code from the previous PR plus the fixes needed to pass the tests
Which issue(s) this PR closes:#11900
Special notes for your reviewer: Original PR #11950
Suggestions on how to test this:
Does this PR introduce a user interface change? If mockups are available, please link/include them here:
Is there a release notes update needed for this change?:
Additional documentation: