-
Notifications
You must be signed in to change notification settings - Fork 493
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
SWORD: "Replacing metadata for a dataset" broken, throws exception #1554
Comments
disabled until there is a fix for IQSS/dataverse#1554
As I noted at #973 (comment) from what I can tell the ability to edit dataset metadata via SWORD broke with the switch from the importXML method on foreignMetadataImportService to importGenericService in ContainerManagerImpl.java. If I use the old method, the test (disabled for now) I just wrote at IQSS/dataverse-apitester@8928ae3 passes. Understandably, @scolapasta doesn't was us to simply revert to the importXML method on foreignMetadataImportService because there's logic in importGenericService that we want. He said to pass this ticket to him. |
@scolapasta found where the new importXML calls this method and sets the id to
|
Wondering if the logic should be to check if the id already exists, if so then if not the same throw an exception. Otherwise proceed. |
Yes, Gustavo's suggestion seems right to me |
I enabled the test at IQSS/dataverse-apitester@24c3138 and ran a build on apitest. It passed: https://build.hmdc.harvard.edu:8443/job/apitest.dataverse.org-apitester/org.dataverse$apitester/19/testReport/org.dataverse.apitester.sword/SwordTest/ |
Will need @kcondon to QA this one |
I added an API test to replace metadata via SWORD in eb3d08d and it works fine: INFO: Title updated from "My Working Title" to "My Awesome Dataset" -- https://build.hmdc.harvard.edu:8443/job/phoenix.dataverse.org-apitest-4.2.3/18/console I don't if that's enough to close this issue, but I'm satisfied. |
While working on #1430 I tested the SWORD function "replacing metadata for a dataset" as documented at http://guides.dataverse.org/en/latest/api/sword.html#replacing-metadata-for-a-dataset and it's not working. I throws the OptimisticLockException below.
Here's the curl command I was using to test:
curl --insecure --upload-file scripts/search/tests/data/dataset-trees1-edit.xml -H 'Content-Type: application/atom+xml' https://spruce:spruce@localhost:8181/dvn/api/data-deposit/v1/swordv2/edit/study/doi:10.5072/FK2/OEJKJ2
I don't know how long this has been broken. I don't believe I have a test for this at https://github.com/IQSS/dataverse-apitester
The text was updated successfully, but these errors were encountered: