-
Notifications
You must be signed in to change notification settings - Fork 479
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
edit delete draft dataset doesn't work except from draft version #5488
Comments
FWIW - I may have at least a work-around for this. In looking at #4760, I found that I needed to do a find(Dataset.class, dataset.getId()) at the start of the DeleteDatasetVersion command to avoid an error about the dataset/it's filemetadatas having been updated previously. I still haven't explored why this might be different depending on the starting page, but I suspect this will fix this issue if the underlying reason is hard to track down. |
We talked about this issue in sprint planning two weeks ago but I don't remember what we decided the approach should be. Are we going to hide the "Delete Draft Dataset" button when you have navigated to a published version? It's easy to replicate this bug. As of 839fb2c in the develop branch on http://phoenix.dataverse.org the UI gives no feedback and here's the stack trace:
|
We should show this option in the drop down and it should work. |
I can confirm that the change I suggested above works. I've made that change as part of an implementation of #4760 for which I'm putting together a PR. You can pick it up that way or I can separate out. If there's a better solution, let me know and I can test whether it also helps in my #4760 approach... |
Thanks @qqmyers, we'll hold off on working on this right now. |
Thanks @qqmyers for the PR! |
The Edit/Delete Draft Dataset button works when used from the draft dataset page but does not work if one is on the page for a published version. The error I see is related to filemetadata so this may be specific to datasets with files. I verified this is an issue on demo.dataverse.org as of v4.10.1. using a test dataset with one file that had been published in the v1.0 version.
FWIW - the DeleteDatasetVersionCommand is called in both cases and it only takes the dataset as a parameter, calling dataset.getLatestVersion(), so it's not clear to me why there's a problem. The error I see occurs in the following line:
DatasetVersion doomedAndMerged = ctxt.em().merge(doomedVersion);
I ran across this in looking at #4760, but am not actively this bug in particular...
The text was updated successfully, but these errors were encountered: