IQSS / IQSS/dataverse

Unpublish Dataset: Create an API endpoint to unpublish a dataset

Open
#4,895 11 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Feature: Publishing & Versions Original size: 50 Type: Feature User Role: Superuser
Dominant language
Java
Stars
1.1k
Forks
564
Avg merge
2d 2h
Merged PRs (30d)
29

Description

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);
  2. (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.
  3. 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;
  4. Change dvobject table for dataset: publicationdate, globalidcreatetime
  5. (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.
  6. Change dataset table: lastexporttime
    update dataset set lastexporttime=NULL where id=3092;

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how the API represents Dataset, Datasetlock, Datasetversion, and Dvobject, then compare the listed manual unpublication steps with existing publication behavior. The endpoint is done when it safely locks the dataset and applies the required state, release-time, publication-date, identifier, and export-time changes for an unpublish operation.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, backend, databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.