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: support boolean values #7961

Open
foobarbecue opened this issue Jun 21, 2021 · 14 comments · May be fixed by #11064 or #10480
Open

Custom Metadata: support boolean values #7961

foobarbecue opened this issue Jun 21, 2021 · 14 comments · May be fixed by #11064 or #10480
Labels
Feature: Metadata Type: Suggestion an idea User Role: Depositor Creates datasets, uploads data, etc.

Comments

@foobarbecue
Copy link
Contributor

foobarbecue commented Jun 21, 2021

It would be very useful to add a fieldType to support inclusion of true / false information. Some discussion with workarounds on the google group here.

@poikilotherm
Copy link
Contributor

Somewhat related to #5989

@pdurbin pdurbin changed the title Custom Metadata: support booean values Custom Metadata: support boolean values Feb 3, 2022
@Asbjoedt
Copy link

Hi @pdurbin
Do you have any news on implementing this feature?
It is something we want to use in a custom metadata block for our forthcoming Dataverse, so users can tick the box/field, if they regard the dataset relevant for submission to National Archives repository.

@pdurbin
Copy link
Member

pdurbin commented Nov 28, 2023

@Asbjoedt no news. Let me mention @scolapasta and @cmbz to let them know you (and others) are interested.

Is this something you (or others) might want to create pull request for? That often helps move things along. 😄

I agree it would be a nice feature.

@pdurbin
Copy link
Member

pdurbin commented Nov 29, 2023

@Asbjoedt also, in the past I've encouraged installations to maintain a project/board of issues they care about. A great current example is https://github.com/orgs/IQSS/projects/15 maintained mostly by @DS-INRA.

If you'd like a board like this, please open an issue at https://github.com/IQSS/dataverse-installations using the "request a project board" template.

@cmbz
Copy link

cmbz commented Nov 30, 2023

@jggautier Any connection here with the NIH GREI metadata recommendations?

@jggautier
Copy link
Contributor

jggautier commented Nov 30, 2023

Hmm, yeah having the option to use a checkbox might help depositors provide information that those recommendations ask for.

@Asbjoedt
Copy link

@pdurbin I can try to look at the source code. I know some Java and strictly speaking this is about implementing the Java boolean data type as a Dataverse data type for metadata blocks, if you agree on this approach?

I've found the file "DatasetFieldType", may you provide me with a list of names of other files that are necessary to change to implement the boolean?

I can't promise, I can create a PR for this, but I may take a look.
I have forked the repo and created a branch, is this sufficient for you to receive a PR?

@pdurbin
Copy link
Member

pdurbin commented Nov 30, 2023

@Asbjoedt great! For details on what files to edit (I'd need to look) maybe you can start a thread in #dev at https://chat.dataverse.org and we can figure it out together.

@cmbz
Copy link

cmbz commented Dec 2, 2023

@Asbjoedt Please comment here if you decide to make a PR. After discussion with @jggautier this issue appears to be aligned with our NIH GREI objectives.

@pdurbin
Copy link
Member

pdurbin commented Dec 7, 2023

Here's the conversation so far: https://dataverse.zulipchat.com/#narrow/stream/379673-dev/topic/The.20boolean/near/405225599

To summarize, I agree with @poikilotherm that his commit at https://jugit.fz-juelich.de/fdm/dev/dataverse/-/commit/d4aece03aebcf9c2237aa7842c17c0d96af6a79a is a good one to study.

@jeromeroucou jeromeroucou linked a pull request Apr 10, 2024 that will close this issue
@DS-INRAE DS-INRAE moved this to 🚧 Dev by Recherche Data Gouv in Recherche Data Gouv Jul 10, 2024
luddaniel added a commit to Recherche-Data-Gouv/dataverse that referenced this issue Dec 5, 2024
@luddaniel
Copy link
Contributor

Hi there, I just checked every conversation and commits related to this issues and I strongly believe that this field type is not useful as we already have a way to do it by using text fieldtype and controlledVocabularies (i.e. controlled values). A good example is #10626 with archiveSubmitToArchivalAppraisal allowing values Yes, No and Unknown.

The Needs :

  • Being able to support "true" / "false" and a possible third value null, "unknown" or unfilled value.
  • Being able to make it not nullable which is possible using required property
  • Being able to internationalize "true" / "false" or third value depending on the input title
  • Being able to export the "boolean"
  • Having a dropdown as it seems to be the favorite GUI component.

All of this is possible using controlled vocabulary of metadata customisation. I would just advice to use values of "True" and "False" for the sake of json export quality and the harvesting using dataverse_json format.

Note that null and unknown is not the same, as one mean unfilled value and one mean "I don't know".

Another good point is to avoid cost a creation and the maintenance of a new boolean data field type related code (JSF, JAVA, SOLR, DOC). Also, no one seems really sure on if we should allow nullable or a third value, personally, I think flexibility is the best way to go, so text fieldtype + controlled values is a great option.

I created a new PR #11064 for documentation
I created a PR Asbjoedt#1 to update #10626 with the adviced values and added archival.properties.

@Asbjoedt
Copy link

Asbjoedt commented Dec 5, 2024

Hey! I do not think I have a problem with leaving the boolean data type behind and instead keep using controlled vocabularies as a way to tweak Dataverse to have a boolean. I am partial to this solution because the other approach has stalled and getting archival.tsv into the codebase was our initial intention.

@pdurbin
Copy link
Member

pdurbin commented Dec 10, 2024

Thanks @luddaniel for keeping this moving and to @Asbjoedt for the flexibility.

Since @luddaniel's PR is "docs only", I went ahead and put it "in review". This one:

We're in the middle of trying to get 6.5 out the door but we'll get to it soon. I'll probably request a review from @jggautier as well.

I believe we can handle the PRs about adding archival.tsv separately from the one above about booleans. These:

That is, we can merge the docs about booleans and THEN think more about archival.tsv PR (with the updated values of "yes" and "no" @luddaniel is proposing).

Thanks again.

pdurbin added a commit that referenced this issue Dec 13, 2024
pdurbin added a commit to Recherche-Data-Gouv/dataverse that referenced this issue Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature: Metadata Type: Suggestion an idea User Role: Depositor Creates datasets, uploads data, etc.
Projects
Status: 🚧 Dev by Recherche Data Gouv
7 participants