-
Notifications
You must be signed in to change notification settings - Fork 531
10476 display on create field option #11224
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
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.
src/main/java/edu/harvard/iq/dataverse/DataverseFieldTypeInputLevel.java
Outdated
Show resolved
Hide resolved
…ructor - Modified constructor to require displayOnCreate parameter - Updated all constructor calls to pass the correct displayOnCreate value
This comment has been minimized.
This comment has been minimized.
- 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 |
|
This PR has a merge conflict. |
This comment has been minimized.
This comment has been minimized.
|
@stevenwinship @ofahimIQSS I have added all the adjustments and the test. |
|
This PR has branch conflicts - can you please resolve. Thanks! |
pdurbin
left a comment
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'm late to reviewing this but @Saixel please take a look.
- Add release note snippet for displayOnCreate field feature - Update API documentation to clarify displayOnCreate behavior
This comment has been minimized.
This comment has been minimized.
pdurbin
left a comment
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.
Thanks for the docs! Some more feedback for you.
This comment has been minimized.
This comment has been minimized.
1 similar comment
|
📦 Pushed preview images as 🚢 See on GHCR. Use by referencing with full name as printed above, mind the registry name. |
|
no issues found during testing - merging PR |
|
Flyway script added in this PR: |
|
|
||
| boolean required = inputLevel.getBoolean("required"); | ||
| boolean include = inputLevel.getBoolean("include"); | ||
| boolean displayOnCreate = inputLevel.getBoolean("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.
If the input JSON doesn't have displayOnCreate, then the field will be set to not displayOnCreate regardless of the default setting? Should this default to null, and the subquery in MetadataBlockServiceBean line 66 get adjusted to only return 1 if displayOnCreate is not null? Otherwise, I think a call to this method that doesn't set displayOnCreate explicitly will cause the default to be overridden. (Not sure I see if/how this could be affecting the tests though).
|
Hey team! I executed the tests related to the Originally Reported Failed Tests:
Failed Tests We Are Currently Seeing:
Identified Discrepancies:
Questions:
|
No, it's being changed in the database by this line: |
Please note: this pull request was reverted by #11306. Stay tuned for a new pull request that implements similar functionality.
What this PR does / why we need it:
This PR introduces the
displayOnCreateproperty to theDataverseFieldTypeInputLevelclass, 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.The implementation includes:
displayOnCreateinDataverseFieldTypeInputLevelTesting via API:
Automated Tests:
Run the integration test:
mvn test -Dtest=DataversesIT#testUpdateInputLevelDisplayOnCreateDoes this PR introduce a user interface change?:
No UI changes in this PR. A separate issue will track the UI implementation.
Additional documentation:
Preview docs at https://dataverse-guide--11224.org.readthedocs.build/en/11224/api/native-api.html#update-collection-input-levels