-
Notifications
You must be signed in to change notification settings - Fork 500
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
10476 display on create field option #11224
base: develop
Are you sure you want to change the base?
Conversation
- Added updateDisplayOnCreate method to DataversePage - Added displayOnCreate handling in DataverseServiceBean - Added displayOnCreate checkbox to dataverse.xhtml - Added displayOnCreate field to DataverseFieldTypeInputLevel
- Remove javadoc comment from updateDisplayOnCreate method in DataversePage.java - Remove inline comment from displayOnCreate setter in DataverseServiceBean.java
- Remove selector changes from dataverse.xhtml as they will be implemented in a separate task focusing on UI improvements
This comment has been minimized.
This comment has been minimized.
@@ -66,6 +67,7 @@ public DataverseFieldTypeInputLevel (DatasetFieldType fieldType, Dataverse datav | |||
this.dataverse = dataverse; | |||
this.required = required; | |||
this.include = include; | |||
this.displayOnCreate = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My concern with this is that the displayOnCreate isn't passed in to the constructor.
This means that the value isn't able to be passed from Dataverses.parseInputLevels.
export JSON='[{"datasetFieldTypeName":"geographicCoverage", "required":true, "include":true}, {"datasetFieldTypeName":"country", "required":true, "include":true}]'
API /api/dataverses/$ID/inputLevels
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would also like to see a test where the displayOnCreate is set and retrieved vis API
…ructor - Modified constructor to require displayOnCreate parameter - Updated all constructor calls to pass the correct displayOnCreate value
📦 Pushed preview images as
🚢 See on GHCR. Use by referencing with full name as printed above, mind the registry name. |
- Update displayOnCreate handling in MetadataBlockServiceBean - Refactor predicates for better input level handling - Add default value handling for displayOnCreate - Update service methods to consider input level configuration
- Add displayOnCreate check method in Dataverse - Update displayOnCreate handling in DatasetPage - Add save method for input levels in service - Update template handling for displayOnCreate - Improve code formatting
Please address the merge conflicts along with the review comments. Thanks |
What this PR does / why we need it:
This PR introduces the
displayOnCreate
property to theDataverseFieldTypeInputLevel
class, allowing administrators to configure metadata fields to appear during dataset creation, even if they are not required.Previously, metadata fields selected for a collection would only appear during dataset creation if they were marked as required (or displayOnCreate by default). This change grants collection administrators control over metadata visibility, improving metadata completeness and discoverability.
Which issue(s) this PR closes:
Special notes for your reviewer:
This PR implements the functionality for
displayOnCreate
, but the UI implementation is not included yet.If you want to temporarily enable a checkbox for testing, you can manually add the following code snippet at line 384 of
dataverse.xhtml
. This will render a checkbox in the collection settings UI to toggle thedisplayOnCreate
property:Once the UI implementation is complete, this manual addition will no longer be necessary.
Suggestions on how to test this:
displayOnCreate
checkbox appears next to metadata fields.displayOnCreate
for a field and save the configuration.Does this PR introduce a user interface change? If mockups are available, please link/include them here:
No UI changes in this PR. A separate issue will track the UI implementation.
Additional documentation: