IQSS / dataverse

Open source research data repository software
http://dataverse.org
Other
878 stars 489 forks source link

Unpublish Dataset: Create an API endpoint to unpublish a dataset #4895

Open kcondon opened 6 years ago

kcondon commented 6 years ago

We need an API endpoint to unpublish datasets in some cases where a user may mistakenly publish their dataset in root when it needs to be reviewed first in by a journal dataverse.

Here are the essential steps by hand that hopefully will become the endpoint:

Tables involved: Dataset Datasetlock Datasetversion Dvobject

To Unpublish a Dataset:

  1. Lock dataset insert into datasetlock (reason, starttime, dataset_id, user_id) values ('InReview', now(), 3092, 7);
    1. (N/A) Reset DOIs to reserved, both dataset and files log on to ezid console, manage dois, set dois from public to unavailable Not really needed: would resolve to need perms link and works again once published.
    2. Change datasetversion table: releasetime, versionstate, versionnumber, minorversionnumber update datasetversion set versionstate='DRAFT', releasetime=NULL, versionnumber=NULL, minorversionnumber=NULL where dataset_id=3092 and id=98;
  2. Change dvobject table for dataset: publicationdate, globalidcreatetime
    1. (N/A) Change dvobject table for datafiles: same as for dataset update dvobject set publicationdate=NULL, globalidcreatetime=NULL where id in (3093, 3094, 3095); Not really needed, no functional impact and ezid has original create time stored.
  3. Change dataset table: lastexporttime update dataset set lastexporttime=NULL where id=3092;
kmika11 commented 2 years ago

Would this include the ability to "unpublish" datasets that are deaccessioned?

donsizemore commented 2 years ago

This would be a nice feature to use against suspected spam or pseudo-science datasets; this, and the ability to prevent future publishing, which could be overridden by a superuser?

pdurbin commented 11 months ago

Related:

DonRichards commented 8 months ago

Just wondering, but is the best alternative to deaccessioned the dataset and publish a new version later? Suggestion from this discussion. https://groups.google.com/g/dataverse-community/c/C6hl_mTx1yM/m/XM75Qy5GAQAJ

pdurbin commented 8 months ago

@DonRichards yes, that's a completely valid and 100% supported approach.

cmbz commented 4 weeks ago

2024/09/16: ABR review, there is a manual process, but worth investigating for API. @sbarbosadataverse please weigh in.