diff --git a/doc/release-notes/10134-link-draft-datasets.md b/doc/release-notes/10134-link-draft-datasets.md new file mode 100644 index 00000000000..0c92d8437c1 --- /dev/null +++ b/doc/release-notes/10134-link-draft-datasets.md @@ -0,0 +1 @@ +It is now possible to link draft datasets to other Dataverse collections. As usual, the datasets will only become publicly visible in the linked collection(s) after they have been published. To publish a linked dataset, your account must have the "Publish Dataset" permission for the Dataverse collection in which the dataset was originally created. Permissions in the linked Dataverse collections do not apply. \ No newline at end of file diff --git a/doc/sphinx-guides/source/user/dataverse-management.rst b/doc/sphinx-guides/source/user/dataverse-management.rst index ecb1f608c12..d88d0a45e68 100755 --- a/doc/sphinx-guides/source/user/dataverse-management.rst +++ b/doc/sphinx-guides/source/user/dataverse-management.rst @@ -219,6 +219,8 @@ In order to link a dataset, you will need your account to have the "Publish Data To link a dataset to your Dataverse collection, you must navigate to that dataset and click the white "Link" button in the upper-right corner of the dataset page. This will open up a window where you can type in the name of the Dataverse collection that you would like to link the dataset to. Select your Dataverse collection and click the save button. This will establish the link, and the dataset will now appear under your Dataverse collection. +A draft dataset can be linked to other Dataverse collections. It will only become publicly visible in the linked collection(s) after it has been published. To publish the dataset, your account must have the "Publish Dataset" permission for the Dataverse collection in which the dataset was originally created. Permissions in the linked Dataverse collections do not apply. + There is currently no way to remove established links in the UI. If you need to remove a link between a Dataverse collection and a dataset, please contact the support team for the Dataverse installation you are using (see the :ref:`unlink-a-dataset` section of the Admin Guide for more information). .. _dataverse-linking: diff --git a/src/main/java/edu/harvard/iq/dataverse/engine/command/impl/LinkDatasetCommand.java b/src/main/java/edu/harvard/iq/dataverse/engine/command/impl/LinkDatasetCommand.java index aef749d7e26..1225c892ac7 100644 --- a/src/main/java/edu/harvard/iq/dataverse/engine/command/impl/LinkDatasetCommand.java +++ b/src/main/java/edu/harvard/iq/dataverse/engine/command/impl/LinkDatasetCommand.java @@ -40,10 +40,7 @@ public LinkDatasetCommand(DataverseRequest aRequest, Dataverse dataverse, Datase @Override public DatasetLinkingDataverse execute(CommandContext ctxt) throws CommandException { - - if (!linkedDataset.isReleased() && !linkedDataset.isHarvested()) { - throw new IllegalCommandException(BundleUtil.getStringFromBundle("dataset.link.not.available"), this); - } + if (linkedDataset.getOwner().equals(linkingDataverse)) { throw new IllegalCommandException(BundleUtil.getStringFromBundle("dataset.link.not.to.owner"), this); } diff --git a/src/main/java/propertyFiles/Bundle.properties b/src/main/java/propertyFiles/Bundle.properties index d7fd94bf65c..72395b4b3a6 100644 --- a/src/main/java/propertyFiles/Bundle.properties +++ b/src/main/java/propertyFiles/Bundle.properties @@ -1603,8 +1603,6 @@ dataset.link.title=Link Dataset dataset.link.save=Save Linked Dataset dataset.link.not.to.owner=Can't link a dataset to its dataverse dataset.link.not.to.parent.dataverse=Can't link a dataset to its parent dataverses -dataset.link.not.published=Can't link a dataset that has not been published -dataset.link.not.available=Can't link a dataset that has not been published or is not harvested dataset.link.not.already.linked=Can't link a dataset that has already been linked to this dataverse dataset.unlink.title=Unlink Dataset dataset.unlink.delete=Remove Linked Dataset diff --git a/src/main/webapp/dataset.xhtml b/src/main/webapp/dataset.xhtml index 78183789b17..b3a0fec1db8 100644 --- a/src/main/webapp/dataset.xhtml +++ b/src/main/webapp/dataset.xhtml @@ -519,7 +519,7 @@ -
+
-
+