-
Notifications
You must be signed in to change notification settings - Fork 498
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
IQSS 10390: Multipid UI Fix #10391
IQSS 10390: Multipid UI Fix #10391
Conversation
PidProvider pidProvider = dataset.getEffectivePidGenerator(); | ||
if(pidProvider == null) { | ||
//This is basically a config error, e.g. if a valid pid provider was removed after this dataset used it | ||
return error(Response.Status.NOT_FOUND, "No PID Generator found for the give id"); |
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.
nitpick here - should be "given" and maybe put it in the bundle. Also should we add a test to PidUtilTest?
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.
done
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.
Just an error label update, and maybe an additional test - see 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 updates
Works fine but I didn't like how (inherited from enclosing Dataverse) and (Default) are squished... ... so I pushed a fix to add spaces in b196f54 Here's the config I tested with:
Tests are passing. Will merge. |
What this PR does / why we need it: Fixes the issue by adding logic to determine what option will be inherited by a collection - the global default or the value inherited from a parent collection. The PR also addresses the issue with the GET /api/datasets/id/pidGenerator call sometime returning "default" instead of the PidProvider that will be used (as documented in the Guides).
Which issue(s) this PR closes:
Special notes for your reviewer: Suggesting we put this in 6.2 to avoid a bug going out.
Suggestions on how to test this: Have more than one pid provider configured, create a subcollection and verify that the menu of options on the Dataverse/Edit/GeneralInfo pane shows the options, including one that is either the (default) - if no parent collection has a non-default selection - or (inherited...) option - when a parent/grandparent has an explicit PIDProvider setting.
Can also call the API call above and verify that it returns a PidProvider id in all cases.
Does this PR introduce a user interface change? If mockups are available, please link/include them here: see screenshot in inssue.
Is there a release notes update needed for this change?: no - fixes a bug that hasn't yet been released.
Additional documentation: