IQSS / IQSS/dataverse

Feature Request/Idea: UI support for nested compound fields

Open
#9,200 10 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Component: JSF Feature: Metadata Type: Feature User Role: Depositor
Dominant language
Java
Stars
1.1k
Forks
564
Avg merge
2d 2h
Merged PRs (30d)
29

Description

Overview of the Feature Request

Currently, Dataverse doesn't fully support nested compound fields (i.e. compound fields within compound fields). More precisely, the UI cannot display them, although the API and the internal data model already appear to support them. In some constellations, the SOLR schema is also not updated correctly.

What kind of user is the feature intended for?

Any user using the UI to view/edit datasets (curator, depositor, guest, superuser...) and API users

What inspired the request?

We would like to use custom metadata schemas that contain nested compound fields.

DataCite v>=4.1 also contains fields like this, e.g. see "7. Contributor" (0-n) with its children "7.4 nameIdentifier" (0-n) and "7.5 affiliation" (0-n) in https://schema.datacite.org/meta/kernel-4.4/doc/DataCite-MetadataKernel_v4.4.pdf

I have tested the following three basic scenarios of nested compound fields (load custom TSV, upload dataset via API, export dataset via API):

  1. compound field nested within compound field
  2. like 1. but outer field has allowmultiple TRUE
  3. like 1. but both fields have allowmultiple TRUE

The TSV files and JSON datasets are here: nested_compound_test.tar.gz

Although the UI cannot display the nested fields, in scenarios 1 and 3 the export actually matched the initial upload, thus it seems the API and the internal data model already support this feature. In scenario 2 I got an error message at export (Exception thrown from bean: org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error from server at http://solr:8983/solr/collection1: ERROR: [doc=dataset_9_draft] multiple values encountered for non multiValued field). After manually editing the SOLR schema file to set multiValued="true", the export succeeded here as well.

What existing behavior do you want changed?

The SOLR schema should be updated correctly when a TSV with nested compound fields is uploaded.

Any brand new behavior do you want to add to Dataverse?

The UI should be able to display nested compound fields when creating, editing and viewing a dataset.

Currently, it looks like this (empty because inner children aren't shown):

Screenshot 2022-11-30 at 17-15-55 Add New Dataset - Root

Any related open or closed issues to this feature request?

https://github.com/IQSS/dataverse/issues/377 is related. When allowing multiples of a compound child, in some cases the compound child itself should also be a compound, e.g.:

"Author" is a compound field. To allow an author to have multiple identifiers, the children "Identifier Scheme" and "Identifier" should be grouped in a repeatable nested compound field.

(See also "7. Contributor" (0-n), "7.4 nameIdentifier" (0-n), "7.4.a nameIdentifierScheme", "7.4.b schemeURI" in https://schema.datacite.org/meta/kernel-4.4/doc/DataCite-MetadataKernel_v4.4.pdf (present since DataCite v4.1 as property 7.5))

cc @johannes-darms

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the three nested-compound scenarios using the linked nested_compound_test.tar.gz files, then trace the dataset UI rendering/editing flow and the SOLR schema update path. Done means nested compound fields display correctly when creating, editing, and viewing datasets, and TSV uploads generate a schema that exports successfully without the reported multiValued error.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
databases, full-stack
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.