Skip to content

Required controlledVocabulary metadata marked as valid while empty #11900

@stevenferey

Description

@stevenferey

Bug description

In Dataverse (v6.8), when a previously optional metadata field becomes required for a dataset, or when a dataset is created via the API without all required metadata (dataverse.api.allow-incomplete-metadata=true), the system displays an Incomplete metadata label and normally prevents DRAFT form validation or dataset publication.

However, if the user uploads a file, Dataverse inserts a record for the missing required controlledVocabulary metadata into the datasetfieldvalue table.

Consequence: required controlledVocabulary metadata fields (e.g. subject) are treated as valid in the dataset metadata form even though their value is empty.

Steps to reproduce

  1. Create a dataset via API with dataverse.api.allow-incomplete-metadata=true without including all required metadata.
  2. Upload a file to the dataset.
  3. Open the dataset metadata edit form.
  4. Notice that required controlledVocabulary fields appear valid although no value is set.

Expected behavior

Required controlledVocabulary fields should remain invalid until a valid value is provided.

Affected version

Dataverse v6.8

Are you thinking about creating a pull request for this issue?

No fix is currently planned by the team.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

🔍 Interest

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions