Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent behavior of repeatable subfields in compound metadata #9911

Open
HenningTimm opened this issue Sep 13, 2023 · 2 comments
Open
Labels
Feature: Metadata Type: Bug a defect User Role: Depositor Creates datasets, uploads data, etc.

Comments

@HenningTimm
Copy link
Contributor

What is going on?

I am having some trouble with (nested) compound metadata in a custom metadata block. In particular, fields that allow multiple entries behave inconsistently when nested under a compound metadata field. In the zulip chat where I first mentioned this, I thought this problem was purely a visualization problem, however, field that use controlled vocabularies behave different than fields that do not.

Values do not display as expected

In the first metadata block (compound_error.csv, sorry, had to change the suffix to csv for GitHub to accept this upload) I tried, a have a datasetField called "Parent" with type none and two related fields "Child A", "Child B" that both allow multiple entries from controlled vocabularies and are nested under "Parent" (i.e. have "Parent" in the parent column).

I can enter multiple values for the "Child A" and "Child B" fields but only the first entry is shown in the UI. E.g. if I enter Child A: "C1 Value A", "C1 Value B" and Child B: "C2 Value E", "C2 Value D" the metadata panel of the dataset will only show "C1 Value A" "C2 Value E", i.e. the first two entries.

So this entry
dv_err_1_entry
renders as
dv_err_1_ui

Nested repeatable fields behave inconsistently

Until here I thought this was just a visibility bug, but today I tested a version that also used an additional field that does not use a controlled vocabulary: In my second metadata block (compound_error_v2.csv) I have a datasetField called "Parent" with type none and three related fields "Child A", "Child B", and "Child C" that all allow multiple entries. Child A and Child B allow multiple entries from controlled vocabularies and are nested under "Parent" (i.e. have "Parent" in the parent column). Child C allows multiple text entries and is also nested under "Parent".

Here, for the field Child 3, I do not get the option to create multiple entries, even though this is specified in the metadata block.
In the following screenshot I do not have the option to create more than one entry.
dv_err_2_entry
And in the UI the problem described above persists, just with one additional entry:
dv_err_2_ui

Affected systems

In all cases above, all values are stored and can be searched for via the advanced search.
When reproducing this issue, (cf. chat) @jggautier experienced problems saving such a dataset. For me everything saved fine (in draft state).

Wild guessing

Since I can only add one entry for Child C (the field without controlled vocabulary), it seems to me that all fields inside a compound metadata chunk are treated as single fields. This could explain why only the first entries show up. The fields that use a controlled vocab somehow seem to weasel around this check.

Steps to reproduce

  1. Add the metadata block compound_error_v2.csv to a dataverse instance
  2. Create a new dataset using this metadata schema
  3. Add at least two entries for Child A and Child B
  4. Confirm that there is not option to add more than one entry for Child C
  5. Save the dataset
  6. Go to the metadata page of the dataset where only the first two entries for Child A and Child B can be seen.

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

Tested with a superuser account, however this should affect all users.

What did you expect to happen?

  1. A list of all entries for the repeatable fields Child A, Child B and Child C can be seen.
  2. It is possible to add more than one entry for Child C

Which version of Dataverse are you using?

5.13

I will, hopefully, be able to test this on 5.14 and 6.0 in the next two weeks.

@bencomp
Copy link
Contributor

bencomp commented Oct 5, 2023

Are you sure it is not related to #9200, as mentioned in the chat? (I don't know, but feel like the issues should be linked for reference.)

@pdurbin
Copy link
Member

pdurbin commented Aug 1, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature: Metadata Type: Bug a defect User Role: Depositor Creates datasets, uploads data, etc.
Projects
None yet
Development

No branches or pull requests

3 participants