-
Notifications
You must be signed in to change notification settings - Fork 495
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
Premature validation of dataset metadata (single value drop down) prevents template selection #10119
Comments
I tried a hack on a DANS development environment and changed the dataverse/src/main/webapp/metadataFragment.xhtml Lines 287 to 288 in 3305c4a
|
A clearer test case: as in scenario 1, have a required field in another metadatablock (e.g. type of article) and a template that should set a field(s) in the citation block (e.g. title). When you create a new dataset and select the template, the page updates but the template fields are not filled in (e.g. no title appears). The page also scrolls down to the missing required field in the other block and the page is left showing that the template is in use when it has not been applied. |
A sharp observation that I overlooked: the page is left showing that the template is in use when it has not been applied. Scenario one is our blocking problem. Scenario two helped me to realize there are two phases of validation. One phase controlled by the HTML attribute |
Hi @jo-pol. I've been following this issue because I noticed part of what you've written and what your screenshot shows, that when someone tries to save a dataset where they haven't filled in a required "single value dropdown" field, the validation error is only that the dropdown button is highlighted in red, "which is easily overlooked" and doesn't match the error messages that Dataverse shows for other types of fields that have some sort of validation. It's an error that some users of Harvard Dataverse will see since the repository is adding a required "single value dropdown" field (IQSS/dataverse.harvard.edu#232). Will your PRs address this, too? Or should another GitHub issue be opened about making it easier for users to see when they need to choose an option from a "single value dropdown" field in order to save the dataset? |
fixed by caf2d91 on the following branches |
It looks like automation closed this but I'm reopening it until this PR is merged (which will auto-close it): |
@jo-pol - thanks for verifying that this has been fixed. Closing. |
I see. It was fixed in 6.2 by this commit: caf2d91 I guess I'll add the 6.2 milestone. |
What steps does it take to reproduce the issue?
Preparations (while logged in on on https://demo.dataverse.org ):
Scenario 1a
Scenario 1b (follow up of 1a)
Scenario 2a
Scenario 2b (follow up of 2a)
When does this issue occur?
See preparations above
Which page(s) does it occurs on?
See scenario's above
What happens?
Scenario 1a/2a: The page scrolls down with the screenshot just out of sight.
Scenario 1b: The page scrolls back to the top with a red error message "...required fields were missed..."
Scenario 2b: The page scrolls back to the top and the title form the template is filled in.
While debuging, I also noticed a lot of server side validation occurred when selecting "new dataset" under "add data". Though it does not cause error messages for the end user, it does not make sense to me. Similarly, I don't expect any validation when selecting a new template as all data is cleared and replaced anyway.
To whom does it occur (all users, curators, superusers)?
Depositors
What did you expect to happen?
Scenario 1a: as scenario 1b including a red message "Type of Article is required", not just the button highlighted in red what is easily overlooked.
Scenario 2a: the title of the template is filled in for the new dataset
Which version of Dataverse are you using?
v. 6.0 build 1512-366fd41
Any related open or closed issues to this bug report?
#2190 The premature validation causes scrolling to the missing required filed, but just too little.
Screenshots:
The text was updated successfully, but these errors were encountered: