-
Notifications
You must be signed in to change notification settings - Fork 484
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
Cannot create Dataverse collection after editing required metadata fields #8236
Comments
On develop (13c334f) I get a slightly different error message (same failure to save): This dataverse was not able to be created. – Please contact Root Support for assistance. Date/Time: 2021-11-10 16:53:55 Server: localhost Here's a stacktrace (duplicate key errors, as reported above): stacktrace.txt Errors like this: |
Haven't completely parse this code, which is in a loop over the set of fields: dataverse/src/main/java/edu/harvard/iq/dataverse/DataversePage.java Lines 615 to 630 in 13c334f
|
Did a quick test - only changing one child field works, so - that
|
Unfortunately, from poking around on develop (4ba22f4) adding one child at a time doesn't work. Here's what I did:
So my understanding of the bug is "two subfields of the same parent cannot be required". I can reproduce this on https://demo.dataverse.org
I tried this but then "required" wasn't enforced. I'm not sure why. I wonder if pull request #7608 is where this behavior was introduced and will probably ask @scolapasta about it. It was merged as part of 5.4 so I'll probably ask @donsizemore to test https://dataverse.unc.edu which is running 5.3. Update: I tried this and could not replicate the issue on the UNC installation. Here's a screenshot of partway through the steps above (about to change "Other ID Identifier" to required): |
I was doing this wrong. @qqmyers was right. It seems like if we ensure the parent is only added once (in my quick test I wasn't adding the parent at all, whoops) then we can have multiple required subfields again. I just made pull request #8246. |
This reverts commit 291dbbe. The original, non-set approach actually works.
allow multiple required subfields #8236
What steps does it take to reproduce the issue?
When does this issue occur?
When creating a new Dataverse collection and trying to edit the required fields.
Which page(s) does it occurs on?
https://dataverse.harvard.edu/dataverse.xhtml
What happens?
The page fails to save and an error is shown:
Error – Command edu.harvard.iq.dataverse.engine.command.impl.CreateDataverseCommand@11c92da3 failed: Transaction aborted If you believe this is an error, please contact Harvard Dataverse Support for assistance.
From the logs, it also appears there are some SEVERE messages related to duplicate key errors around this time.
To whom does it occur (all users, curators, superusers)?
Anyone with Dataverse collection create permissions.
What did you expect to happen?
I expected a new Dataverse collection to be created and I expected those fields under related publication to be required for new datasets.
Which version of Dataverse are you using?
5.6 (dataverse.harvard.edu), but this occurs in 5.8 (demo.dataverse.org) as well.
Any related open or closed issues to this bug report?
I looked, and will take another look, but none popped out.
Screenshots:
The text was updated successfully, but these errors were encountered: