dataverse icon indicating copy to clipboard operation
dataverse copied to clipboard

Custom metadata support boolean values

Open jeromeroucou opened this issue 1 year ago • 3 comments

What this PR does / why we need it:

This PR add possibility for a depositor to write boolean values for a metadata field.

Which issue(s) this PR closes:

  • Closes #7961

Special notes for your reviewer:

I take a large possible value, view on documentation Feature Flag. On dataset edition, it's a input text to write metadata value.

Suggestions on how to test this:

On a metadata file, add a new metadata like below (exemple for citation.tsv file) :

	booleanMetadata	Boolean metadata		true, 1, yes, Y, On, false, 0, no, N, Off	boolean	99	#VALUE	FALSE	FALSE	FALSE	FALSE	TRUE	FALSE		citation	

Does this PR introduce a user interface change? If mockups are available, please link/include them here:

Boolean metadata on dataset edition : edit_boolean_metadata

Invalid boolean value : edit_boolean_metadata_invalid

Boolean value on dataset metadata view : bool_metadata

dataverse_json export :

{"typeName":"booleanMetadata","multiple":false,"typeClass":"primitive","value":"TRUE"}

Is there a release notes update needed for this change?:

Yes, a new commit will be added to add more detail on release note snippet

Additional documentation:

Added boolean support on metadata customization documentation. Preview at

https://dataverse-guide--10480.org.readthedocs.build/en/10480/admin/metadatacustomization.html#fieldtype-definitions

jeromeroucou avatar Apr 10 '24 16:04 jeromeroucou

Coverage Status

coverage: 20.723% (+0.01%) from 20.71% when pulling 26152169b26e946587a8a9f03bbec53a73072356 on Recherche-Data-Gouv:7961_Custom_Metadata_support_boolean_values into bee4eb4c1be4b701cc1da2b8782df871bc48d7b7 on IQSS:develop.

coveralls avatar Apr 10 '24 16:04 coveralls

@jeromeroucou thanks for the pull request! @Asbjoedt and I have been discussing possible implementations at https://dataverse.zulipchat.com/#narrow/stream/379673-dev/topic/The.20boolean/near/405225599 and then in person in Mexico so I'd love for him to take a look to see if this will work for him.

You don't happen to have the code deployed to a server do you?

pdurbin avatar Apr 10 '24 20:04 pdurbin

Sure, if @Asbjoedt can review the PR, this could be a good idea. And no, this PR doesn't have been tested on a server yet, only on my laptop.

Thanks for asking the question @pdurbin, it reminds me that having an integration server is going to become a good thing for Research Data Gouv team given the PR proposals we're doing.

jeromeroucou avatar Apr 11 '24 09:04 jeromeroucou

Closed in favor of #11064

jeromeroucou avatar Jan 08 '25 08:01 jeromeroucou