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

Custom Metadata: Allow Dataverse Installations to Define Conditionally Required Fields for Compound Fields #7606

Closed
scolapasta opened this issue Feb 12, 2021 · 1 comment · Fixed by #7608

Comments

@scolapasta
Copy link
Contributor

scolapasta commented Feb 12, 2021

Currently, when defining metadata for compound fields, fields can either be optional or required, i.e. if required you must always have (at least one) value for that field. For example Author Name being required means you must have at least one Author with an nonempty Author name.

An example of Optional (and a simplified table for values in the defining tsv file):

image

An example of Required (and a simplified table for values in the defining tsv file*):

image

(Note: the tsv technically currently has FALSE for the parent, and the PR for this issue will have to change them to TRUE; but we show TRUE here to differentiate for how we will define the new "Conditionally Required" fields)

In order to support more robust metadata (and specifically to resolve #7551), we need to allow a third case: Conditionally Required, that is, the field is required if and only if any of its "sibling" fields are required. For example, a user does not have to enter a Producer, but if they do, they have to enter a Producer Name.

Here is an example of Conditionally Required (and a simplified table for values in the defining tsv file):
image

The other needed change will be how to handle Dataverse level input levels (when you can make something required that isn't required by the installation). In order to minimize the design burden, for this issue, we'll just modify the default "Optional" radio button to be "Conditionally Required" for these fields. In other words, a Dataverse Admin can make such a field more strict by making it fully required, but they can not reduce it to just optional. Additionally, they will not be able to make Optional fields Conditionally Required yet.

image

@TaniaSchlatter
Copy link
Member

Looks good, @scolapasta. Thanks for the clear examples. Might just need a basic UI review to make sure it fits the standards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants