Skip to content

Fix ListMetadataBlocksCommand to not return fields marked as displayOnCreate=true if there is an input level with include=false #10741

@GPortas

Description

@GPortas

What steps does it take to reproduce the issue?

Create a collection from JSF, in the metadata blocks section, uncheck the option to inherit the metadata blocks from the parent. In citation, deselect the Notes field, which is a field with displayOnCreate=true in the database.

Submit the new collection. When creating a dataset in the new collection, you will see that Notes does not appear, even though the configuration will remain with displayOnCreate=true in the database. The input level with include=false takes precedence over displayOnCreate=true and therefore is not displayed.

The API for collection/{id}/metadata blocks, which uses ListMetadataBlocksCommand, returns this field when displayOnCreate=true.

Since there is an input level with include=false, this field should not be returned from the API.

We need to update the related queries in MetadataBlockServiceBean

  • When does this issue occur?

We detected it on the SPA, since it uses the mentioned endpoint.

  • Which page(s) does it occurs on?

None on JSF

  • What happens?

n/a

  • To whom does it occur (all users, curators, superusers)?

API users

  • What did you expect to happen?

The API for collection/{id}/metadata blocks, which uses ListMetadataBlocksCommand, should not any field with displayOnCreate=true if there is an input level with include=false.

Which version of Dataverse are you using?

latest develop

Any related open or closed issues to this bug report?

Metadata

Metadata

Assignees

Labels

GREI Re-archIssues related to the GREI Dataverse rearchitectureOriginal size: 10SPAThese changes are required for the Dataverse SPASPA.Q3Not related to any specific Q3 featureSize: 10A percentage of a sprint. 7 hours.Type: Buga defect

Type

No type

Projects

Status

No status

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions