Code 500 when updating a field of a custom metadatablock field with controlledVocabulary via the API.
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 564
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 29
Description
What steps does it take to reproduce the issue?
- All the necessary steps to add a custom metadata block. The file customweather.tsv is attached to this issue.
- generate at dataset with empty weather metadata and use the persistentid in the curl command
curl -H "X-Dataverse-key: $API_TOKEN" -X PUT $SERVER_URL/api/datasets/:persistentId/editMetadata?persistentId=$PERSISTENT_IDENTIFIER&replace=true --upload-file weather_source.json
- When does this issue occur?
When trying to change the value of a field with controlledVocabulary:
curl -H "X-Dataverse-key: $API_TOKEN" -X PUT $SERVER_URL/api/datasets/:persistentId/editMetadata?persistentId=$PERSISTENT_IDENTIFIER&replace=true --upload-file weather_source.json
(json file is in the attached zip)
It works with a field without controlledVocabulary (like the weather_basic.json). It also works when using the web form.
- Which page(s) does it occurs on?
the native API and with pyDataverse
- What happens?
Status code 500 and and an empty response {}.
- To whom does it occur (all users, curators, superusers)?
not tested
- What did you expect to happen?
Update the value of the weather meta data as with the weather_basic.json
Which version of Dataverse are you using?
v. 5.11 build 1009-21ac7e1
Any related open or closed issues to this bug report?
https://groups.google.com/g/dataverse-community/c/XHqGN5D9zZs/m/b63jWEd3AAAJ
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the native API endpoint shown in the curl command and reproduce the failure using customweather.tsv, weather_source.json, and weather_basic.json from bug.zip. Compare updates for fields with and without controlledVocabulary, including the pyDataverse path. Done means updating the controlled-vocabulary field succeeds like the basic metadata update instead of returning status 500 and {}.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100