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
prevent double linking of datasets and dataverses #7259 #7415
Conversation
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.
Added a few comments / questions. Also, do we know if the same issue exists for linking dataverses? if so, should we add similar logic to LinkDataverseCommand?
src/main/java/edu/harvard/iq/dataverse/engine/command/impl/LinkDatasetCommand.java
Outdated
Show resolved
Hide resolved
Yes, the same issue exists. Fixed in 5d4a3dc. |
I'm going to go ahead and put this into code review even though I might add another test for #7430 (as discussed in Slack). Here are the changes since the last code review:
|
I moved it back to in progress to reflect that I'm still hacking on tests. |
What this PR does / why we need it:
Users have been able to link a dataset to the same dataverse twice (or more) via API. This prevents it.
Update: in testing, it was found that it's also possible to link a dataverse to the same dataverse more than once. A fix has been added for this too.
Which issue(s) this PR closes:
Closes #7259
Special notes for your reviewer:
I tacked a test on an existing test method but I'm happy to create a dedicated test method if that's preferred.Update: a new LinkIT test class was added.Suggestions on how to test this:
Does this PR introduce a user interface change? If mockups are available, please link/include them here:
No.
Is there a release notes update needed for this change?:
Probably not worth it. Just a bug fix.
Additional documentation:
None.