Skip to content

Removing Values from Repeatable Fields After Reordering Causes Inconsistent Duplication #4418

@jaril1

Description

@jaril1

Describe the bug

In DSpace 8.x/9 submission forms, removing a value from a repeatable metadata field (e.g., dc.contributor.author) after reordering the entries leads to inconsistent and incorrect duplication of values. In some cases, the issue is visible immediately after the deletion; in other cases, it appears only after saving and returning to the form. Occasionally, the values may appear correct, making this a non-deterministic and hard-to-detect bug that results in incorrect metadata being stored.

To Reproduce

Steps to reproduce the behavior:

  1. Open the submission form and enter values into a repeatable metadata field, e.g:
  • Value 1
  • Value 2
  • Value 3
  • Value 4
  • Value 5
  1. Reorder the values using drag-and-drop. For example, move "Value 4" above "Value 2"

  2. Remove "Value 2"

  3. Click "Save for later" to store the current state of the submission.

  4. Reopen the draft submission and inspect the values in the repeatable field.

Expected behavior

After reordering and deleting, the remaining values should consistently be:

  • Value 1
  • Value 4
  • Value 3
  • Value 5

Related work

Likely related to recent changes in PR #3679, which modified how repeatable field values are reordered and managed.

Metadata

Metadata

Assignees

Type

Projects

Status

🏗 In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions