fix: fix bug in OAI-ORE exporter related to nested compound fields #11190
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it:
This PR enables the OAI-ORE exporter to generate a metadata export for metadata containing nested compound fields (i.e. compound fields within compound fields).
Which issue(s) this PR closes:
Special notes for your reviewer:
/
Suggestions on how to test this:
Create a metadata block containing nested compound fields, e.g. use one in here: nested_compound_test.tar.gz
curl http://localhost:8080/api/admin/datasetfield/load -H "Content-type: text/tab-separated-values" -X POST --upload-file nested_compound_test2.tsv
Enable metadata block
Create a dataset using the metadata block, e.g. using a JSON file in the archive linked above
curl -H "X-Dataverse-key: $API_TOKEN" -X POST "http://localhost:8080/api/dataverses/root/datasets" --upload-file nested_compound_test2.json -H 'Content-type:application/json'
Go to
http://localhost:8080/dataset.xhtml?persistentId=...
(using PID returned by the API in 3.)Publish dataset
Reload page
Open "Metadata" tab, click "Export Metadata" button and select "OAI_ORE"
Check that the export contains no errors: nested_compound_test2_oai_ore_export.json
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:
/