From bb1be0921c61293a1f32bc66337ec0af9694834b Mon Sep 17 00:00:00 2001 From: Philip Durbin Date: Tue, 4 Nov 2014 15:58:26 -0500 Subject: [PATCH] SWORD: don't force major version bumps of dataset #795 --- doc/Sphinx/source/API/SWORD.rst | 4 ++-- .../api/datadeposit/ContainerManagerImpl.java | 16 +++++----------- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/doc/Sphinx/source/API/SWORD.rst b/doc/Sphinx/source/API/SWORD.rst index 7480e8cda06..8ee42f12298 100755 --- a/doc/Sphinx/source/API/SWORD.rst +++ b/doc/Sphinx/source/API/SWORD.rst @@ -41,6 +41,8 @@ New features as of v1.1 - Dataverses can be published via SWORD +- Datasets versions will only be increased to the next minor version (i.e. 1.1) rather than a major version (2.0) if possible. This depends on the nature of the change. + - Granular permissions are used for certain operations. Previously, you needed to be "admin" on a dataverse to use the Data Deposit API at all. - The Service Document will return all the dataverses on which you have the "AddDataset" permission. This should resolve the issue reported at https://trello.com/c/F2ZQPFdM/6-reconcile-what-is-seen-by-the-data-deposit-api-and-the-gui-currently-python-api-hides-dvs-from-admin-unless-it-is-also-dv-creato @@ -210,8 +212,6 @@ These are features we'd like to add in the future: - Populate "Subject" from parent dataverse rather than always using "Other": https://github.com/IQSS/dataverse/issues/769 -- Do not force major version bumps of datasets: https://github.com/IQSS/dataverse/issues/795 - - Let file metadata (i.e. description) be specified during zip upload: https://github.com/IQSS/dataverse/issues/723 - SWORD: Display of actual dcterms xml element for equivalent of required field not found: https://github.com/IQSS/dataverse/issues/1019 diff --git a/src/main/java/edu/harvard/iq/dataverse/api/datadeposit/ContainerManagerImpl.java b/src/main/java/edu/harvard/iq/dataverse/api/datadeposit/ContainerManagerImpl.java index 3cec8aa35c2..7913c515ffc 100644 --- a/src/main/java/edu/harvard/iq/dataverse/api/datadeposit/ContainerManagerImpl.java +++ b/src/main/java/edu/harvard/iq/dataverse/api/datadeposit/ContainerManagerImpl.java @@ -304,17 +304,11 @@ public DepositReceipt useHeaders(String uri, Deposit deposit, AuthCredentials au Command cmd; try { boolean doMinorVersionBump = false; - /** - * if business rules change, uncomment - * this code to always try a minor - * version bump when allowed: - * https://github.com/IQSS/dataverse/issues/795 - */ -// if (dataset.getLatestVersion().isMinorUpdate()) { -// doMinorVersionBump = true; -// } else { -// doMinorVersionBump = false; -// } + if (dataset.getLatestVersion().isMinorUpdate()) { + doMinorVersionBump = true; + } else { + doMinorVersionBump = false; + } cmd = new PublishDatasetCommand(dataset, user, doMinorVersionBump); dataset = engineSvc.submit(cmd); } catch (CommandException ex) {