Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 500 errors when uploading single controlled vocab or compound field values to editMetadata API #11168

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

vera
Copy link
Contributor

@vera vera commented Jan 20, 2025

What this PR does / why we need it:

This PR fixes a 500 server error returned when updating two specific kinds of fields using the /api/datasets/<id>/editMetadata API:

  • a single/non-multiple controlled vocab value (e.g. journalArticleType in the journals block)
  • a value inside a single/non-multiple compound field (e.g. targetSampleSizeFormula in targetSampleSize in the socialscience block)

Which issue(s) this PR closes:

Special notes for your reviewer:

/

Suggestions on how to test this:

I've added tests for the two cases that can be run with mvn test -Dtest="DatasetsIT#testAddUpdateDatasetViaNativeAPI"

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:

/

@coveralls
Copy link

Coverage Status

coverage: 22.75% (-0.001%) from 22.751%
when pulling 69b9a01 on vera:edit-metadata-api-500-error
into 69ebed2 on IQSS:develop.

@ofahimIQSS ofahimIQSS added the Size: 3 A percentage of a sprint. 2.1 hours. label Jan 21, 2025
@sekmiller sekmiller self-assigned this Jan 22, 2025
@sekmiller sekmiller added the FY25 Sprint 15 FY25 Sprint 15 (2025-01-15 - 2025-01-29) label Jan 22, 2025
Copy link
Contributor

@sekmiller sekmiller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Nice catch. Thanks!

@sekmiller sekmiller removed their assignment Jan 22, 2025
@ofahimIQSS ofahimIQSS self-assigned this Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FY25 Sprint 15 FY25 Sprint 15 (2025-01-15 - 2025-01-29) Size: 3 A percentage of a sprint. 2.1 hours.
Projects
Status: QA ✅
Development

Successfully merging this pull request may close these issues.

Using editMetadata API endpoint fails when editing non-multiple compound or vocabulary fields
4 participants