Skip to content

Impossible to add new unqualified metadata fields in edit metadata tab #4339

@alexandrevryghem

Description

@alexandrevryghem

Describe the bug

In some very rare cases, it is possible that the edit metadata field validation prevents you from submitting a new metadata field. This only happens for unqualified fields if the unqualified field was created when the DB already contained 20 other qualified fields. This is because the frontend doesn't request the fields to be sorted by name in the validation request, so it will return them in the order they were created.

image

To Reproduce

Steps to reproduce the behavior:

  1. Update your dublin-core-types.xml file and remove the dc.relation field
  2. Add additional dc.relation.* fields in order for you to have at least 20 qualified fields
  3. Create a new empty DB
  4. Add the unqualified dc.relation field (can be done with the UI through Registries > Metadata)
  5. Go to the edit metadata tab of a random item
  6. Fill in the dc.relation field and some value
  7. Click on the complete button, and you will see that a validation error is shown

Expected behavior

We should also sort the order of the metadata fields for the metadata field name validation call.

Related work

In #2177, we already updated the UI to display the unqualified field as the first one

Metadata

Metadata

Labels

bugclaimed: AtmireAtmire team is working on this issue & will contribute backcomponent: Item(Archived) Item display or editing

Type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions