Fix ListMetadataBlocksCommand to not return fields marked as displayOnCreate=true if there is an input level with include=false #10741
Labels
GREI Re-arch
Issues related to the GREI Dataverse rearchitecture
Original size: 10
Size: 10
A percentage of a sprint. 7 hours.
SPA.Q3
Not related to any specific Q3 feature
SPA
These changes are required for the Dataverse SPA
Type: Bug
a defect
Milestone
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
We detected it on the SPA, since it uses the mentioned endpoint.
None on JSF
n/a
API users
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?
The text was updated successfully, but these errors were encountered: