From a0a7c8d05bf5fd0416a48a6052d87c987603312f Mon Sep 17 00:00:00 2001 From: Thibault Coupin Date: Mon, 3 Oct 2022 09:26:24 +0200 Subject: [PATCH 01/14] Harvest: map publisher tag to distributorName --- .../db/migration/V5.12.0.1__8739-publisher-during-harvesting.sql | 1 + 1 file changed, 1 insertion(+) create mode 100644 src/main/resources/db/migration/V5.12.0.1__8739-publisher-during-harvesting.sql diff --git a/src/main/resources/db/migration/V5.12.0.1__8739-publisher-during-harvesting.sql b/src/main/resources/db/migration/V5.12.0.1__8739-publisher-during-harvesting.sql new file mode 100644 index 00000000000..c4dbd901181 --- /dev/null +++ b/src/main/resources/db/migration/V5.12.0.1__8739-publisher-during-harvesting.sql @@ -0,0 +1 @@ +update foreignmetadatafieldmapping set datasetfieldname = 'distributorName' where foreignfieldxpath = ':publisher'; From d92d048354d19ca58665f0db6fd0cb673dd6f985 Mon Sep 17 00:00:00 2001 From: plecor <146710476+plecor@users.noreply.github.com> Date: Thu, 2 May 2024 13:40:00 +0200 Subject: [PATCH 02/14] Rename migration file --- ...vesting.sql => V6.2.0.2__8739-publisher-during-harvesting.sql} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/main/resources/db/migration/{V5.12.0.1__8739-publisher-during-harvesting.sql => V6.2.0.2__8739-publisher-during-harvesting.sql} (100%) diff --git a/src/main/resources/db/migration/V5.12.0.1__8739-publisher-during-harvesting.sql b/src/main/resources/db/migration/V6.2.0.2__8739-publisher-during-harvesting.sql similarity index 100% rename from src/main/resources/db/migration/V5.12.0.1__8739-publisher-during-harvesting.sql rename to src/main/resources/db/migration/V6.2.0.2__8739-publisher-during-harvesting.sql From d6a6e56df7bae324e95c25e7a2b0de5f6d273aa1 Mon Sep 17 00:00:00 2001 From: plecor <146710476+plecor@users.noreply.github.com> Date: Tue, 14 May 2024 15:31:20 +0200 Subject: [PATCH 03/14] Add use case to HarvestingClientsIT --- .../edu/harvard/iq/dataverse/api/HarvestingClientsIT.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/test/java/edu/harvard/iq/dataverse/api/HarvestingClientsIT.java b/src/test/java/edu/harvard/iq/dataverse/api/HarvestingClientsIT.java index 340eab161bb..5020e37edb8 100644 --- a/src/test/java/edu/harvard/iq/dataverse/api/HarvestingClientsIT.java +++ b/src/test/java/edu/harvard/iq/dataverse/api/HarvestingClientsIT.java @@ -299,6 +299,11 @@ private void harvestingClientRun(boolean allowHarvestingMissingCVV) throws Inte } // verify count after collecting global ids assertEquals(expectedNumberOfSetsHarvested, jsonPath.getInt("data.total_count")); + + // ensure the publisher name is present in the harvested dataset citation + Response harvestedDataverse = given().get(ARCHIVE_URL + "/api/dataverses/1"); + String harvestedDataverseName = harvestedDataverse.getBody().jsonPath().getString("data.name"); + assertTrue(jsonPath.getString("data.items[0].citation").contains(harvestedDataverseName)); // Fail if it hasn't completed in maxWait seconds assertTrue(i < maxWait); From 64b69b94a7677d927c81b30f1a9cf43b470412eb Mon Sep 17 00:00:00 2001 From: plecor <146710476+plecor@users.noreply.github.com> Date: Tue, 14 May 2024 15:50:19 +0200 Subject: [PATCH 04/14] Add release note --- doc/release-notes/8739-publisher-during-harvesting.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 doc/release-notes/8739-publisher-during-harvesting.md diff --git a/doc/release-notes/8739-publisher-during-harvesting.md b/doc/release-notes/8739-publisher-during-harvesting.md new file mode 100644 index 00000000000..602b2cf34d6 --- /dev/null +++ b/doc/release-notes/8739-publisher-during-harvesting.md @@ -0,0 +1 @@ +The publisher value of harvested datasets is now attributed to the dataset's distributor instead of its producer. This change affects all newly harvested datasets. For more information, see #8739 \ No newline at end of file From 5dfb01ef58f11dbac8ed4153e265e606b55fef0c Mon Sep 17 00:00:00 2001 From: Philip Durbin Date: Tue, 14 May 2024 13:55:24 -0400 Subject: [PATCH 05/14] add change in behavior to new harvesting client changlog #8739 --- doc/sphinx-guides/source/admin/harvestclients.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/sphinx-guides/source/admin/harvestclients.rst b/doc/sphinx-guides/source/admin/harvestclients.rst index 59fc4dc2c64..1e45fd06fc8 100644 --- a/doc/sphinx-guides/source/admin/harvestclients.rst +++ b/doc/sphinx-guides/source/admin/harvestclients.rst @@ -47,3 +47,8 @@ What if a Run Fails? Each harvesting client run logs a separate file per run to the app server's default logging directory (``/usr/local/payara6/glassfish/domains/domain1/logs/`` unless you've changed it). Look for filenames in the format ``harvest_TARGET_YYYY_MM_DD_timestamp.log`` to get a better idea of what's going wrong. Note that you'll want to run a minimum of Dataverse Software 4.6, optimally 4.18 or beyond, for the best OAI-PMH interoperability. + +Harvesting Client Changelog +--------------------------- + +- As of Dataverse 6.3, the publisher value of harvested datasets is now attributed to the dataset's distributor instead of its producer. This change affects all newly harvested datasets. For more information, see https://github.com/IQSS/dataverse/pull/9013 From 09fd6c1bd75d0d25e67f730342f98a897579f954 Mon Sep 17 00:00:00 2001 From: Pierre Le Corre <146710476+plecor@users.noreply.github.com> Date: Tue, 3 Dec 2024 16:44:35 +0100 Subject: [PATCH 06/14] Update doc/sphinx-guides/source/admin/harvestclients.rst Co-authored-by: Philip Durbin --- doc/sphinx-guides/source/admin/harvestclients.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/sphinx-guides/source/admin/harvestclients.rst b/doc/sphinx-guides/source/admin/harvestclients.rst index 1e45fd06fc8..3c4c0957c2b 100644 --- a/doc/sphinx-guides/source/admin/harvestclients.rst +++ b/doc/sphinx-guides/source/admin/harvestclients.rst @@ -51,4 +51,4 @@ Note that you'll want to run a minimum of Dataverse Software 4.6, optimally 4.18 Harvesting Client Changelog --------------------------- -- As of Dataverse 6.3, the publisher value of harvested datasets is now attributed to the dataset's distributor instead of its producer. This change affects all newly harvested datasets. For more information, see https://github.com/IQSS/dataverse/pull/9013 +- As of Dataverse 6.6, the publisher value of harvested datasets is now attributed to the dataset's distributor instead of its producer. This change affects all newly harvested datasets. For more information, see https://github.com/IQSS/dataverse/pull/9013 From 8b273e8bedebd2930e687a1d783dbea8739adf82 Mon Sep 17 00:00:00 2001 From: Pierre Le Corre <146710476+plecor@users.noreply.github.com> Date: Tue, 3 Dec 2024 16:44:58 +0100 Subject: [PATCH 07/14] Update doc/release-notes/8739-publisher-during-harvesting.md Co-authored-by: Philip Durbin --- doc/release-notes/8739-publisher-during-harvesting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/release-notes/8739-publisher-during-harvesting.md b/doc/release-notes/8739-publisher-during-harvesting.md index 602b2cf34d6..05dcc53ac7d 100644 --- a/doc/release-notes/8739-publisher-during-harvesting.md +++ b/doc/release-notes/8739-publisher-during-harvesting.md @@ -1 +1 @@ -The publisher value of harvested datasets is now attributed to the dataset's distributor instead of its producer. This change affects all newly harvested datasets. For more information, see #8739 \ No newline at end of file +The publisher value of harvested datasets is now attributed to the dataset's distributor instead of its producer. This change affects all newly harvested datasets. For more information, see [the guides](https://dataverse-guide--9013.org.readthedocs.build/en/9013/admin/harvestclients.html#harvesting-client-changelog), #8739, and #9013. \ No newline at end of file From bc33fbfa2cc52353f7a0da0c58a6af0dcb87216f Mon Sep 17 00:00:00 2001 From: Pierre Le Corre <146710476+plecor@users.noreply.github.com> Date: Tue, 3 Dec 2024 16:47:57 +0100 Subject: [PATCH 08/14] Rename migration script --- ...vesting.sql => V6.4.0.1__8739-publisher-during-harvesting.sql} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/main/resources/db/migration/{V6.2.0.2__8739-publisher-during-harvesting.sql => V6.4.0.1__8739-publisher-during-harvesting.sql} (100%) diff --git a/src/main/resources/db/migration/V6.2.0.2__8739-publisher-during-harvesting.sql b/src/main/resources/db/migration/V6.4.0.1__8739-publisher-during-harvesting.sql similarity index 100% rename from src/main/resources/db/migration/V6.2.0.2__8739-publisher-during-harvesting.sql rename to src/main/resources/db/migration/V6.4.0.1__8739-publisher-during-harvesting.sql From b94d53fe1a5fe7a861fb0b5c4b180d76625b40dd Mon Sep 17 00:00:00 2001 From: Pierre Le Corre <146710476+plecor@users.noreply.github.com> Date: Wed, 4 Dec 2024 17:32:54 +0100 Subject: [PATCH 09/14] Improve release note --- doc/release-notes/8739-publisher-during-harvesting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/release-notes/8739-publisher-during-harvesting.md b/doc/release-notes/8739-publisher-during-harvesting.md index 05dcc53ac7d..3e1555396c0 100644 --- a/doc/release-notes/8739-publisher-during-harvesting.md +++ b/doc/release-notes/8739-publisher-during-harvesting.md @@ -1 +1 @@ -The publisher value of harvested datasets is now attributed to the dataset's distributor instead of its producer. This change affects all newly harvested datasets. For more information, see [the guides](https://dataverse-guide--9013.org.readthedocs.build/en/9013/admin/harvestclients.html#harvesting-client-changelog), #8739, and #9013. \ No newline at end of file +The publisher value of harvested datasets is now attributed to the dataset's distributor instead of its producer. This improves the citation associated with these datasets, but the change only affects newly harvested datasets. All datasets should be re-harvested if you wish to pick up this change on already harvested datasets. For more information, see [the guides](https://dataverse-guide--9013.org.readthedocs.build/en/9013/admin/harvestclients.html#harvesting-client-changelog), #8739, and #9013. \ No newline at end of file From b23d82b00d9797779d6771c6061cf1c1deec1cb9 Mon Sep 17 00:00:00 2001 From: Pierre Le Corre <146710476+plecor@users.noreply.github.com> Date: Thu, 5 Dec 2024 09:53:25 +0100 Subject: [PATCH 10/14] Rename migration file --- ...6.4.0.1__8739-publisher-during-harvesting.sql => V6.5.0.1.sql} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/main/resources/db/migration/{V6.4.0.1__8739-publisher-during-harvesting.sql => V6.5.0.1.sql} (100%) diff --git a/src/main/resources/db/migration/V6.4.0.1__8739-publisher-during-harvesting.sql b/src/main/resources/db/migration/V6.5.0.1.sql similarity index 100% rename from src/main/resources/db/migration/V6.4.0.1__8739-publisher-during-harvesting.sql rename to src/main/resources/db/migration/V6.5.0.1.sql From c8499ba9553ac46cf3adc56d1b9e56f0c781d30f Mon Sep 17 00:00:00 2001 From: Pierre Le Corre <146710476+plecor@users.noreply.github.com> Date: Mon, 9 Dec 2024 16:52:09 +0100 Subject: [PATCH 11/14] Applies sql change to upsert script --- .../db/migration/afterMigrate__1-7256-upsert-referenceData.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/db/migration/afterMigrate__1-7256-upsert-referenceData.sql b/src/main/resources/db/migration/afterMigrate__1-7256-upsert-referenceData.sql index 07e9b2c6266..f63fedba02f 100644 --- a/src/main/resources/db/migration/afterMigrate__1-7256-upsert-referenceData.sql +++ b/src/main/resources/db/migration/afterMigrate__1-7256-upsert-referenceData.sql @@ -31,7 +31,7 @@ INSERT INTO foreignmetadatafieldmapping (id, foreignfieldxpath, datasetfieldname (15, 'affiliation', 'authorAffiliation', TRUE, 3, 1 ), (16, ':contributor', 'contributorName', FALSE, NULL, 1 ), (17, 'type', 'contributorType', TRUE, 16, 1 ), - (18, ':publisher', 'producerName', FALSE, NULL, 1 ), + (18, ':publisher', 'distributorName', FALSE, NULL, 1 ), (19, ':language', 'language', FALSE, NULL, 1 ) ON CONFLICT DO NOTHING; From 2415ed711ae68428a61e09d3751ed18d586b408e Mon Sep 17 00:00:00 2001 From: Pierre Le Corre <146710476+plecor@users.noreply.github.com> Date: Tue, 7 Jan 2025 08:32:15 +0100 Subject: [PATCH 12/14] Add comment to sql file --- src/main/resources/db/migration/V6.5.0.2.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/resources/db/migration/V6.5.0.2.sql b/src/main/resources/db/migration/V6.5.0.2.sql index c4dbd901181..e2814139e3d 100644 --- a/src/main/resources/db/migration/V6.5.0.2.sql +++ b/src/main/resources/db/migration/V6.5.0.2.sql @@ -1 +1,2 @@ +-- #8739 map publisher tag to distributorName when harvesting update foreignmetadatafieldmapping set datasetfieldname = 'distributorName' where foreignfieldxpath = ':publisher'; From b1db18e6ddfe480af331788f7131053919948739 Mon Sep 17 00:00:00 2001 From: Pierre Le Corre <146710476+plecor@users.noreply.github.com> Date: Wed, 8 Jan 2025 08:29:06 +0100 Subject: [PATCH 13/14] Update Dataverse version in changelog Co-authored-by: Omer Fahim --- doc/sphinx-guides/source/admin/harvestclients.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/sphinx-guides/source/admin/harvestclients.rst b/doc/sphinx-guides/source/admin/harvestclients.rst index 41348cc9774..38a00d6921c 100644 --- a/doc/sphinx-guides/source/admin/harvestclients.rst +++ b/doc/sphinx-guides/source/admin/harvestclients.rst @@ -51,7 +51,7 @@ Note that you'll want to run a minimum of Dataverse Software 4.6, optimally 4.18 Harvesting Client Changelog --------------------------- -- As of Dataverse 6.6, the publisher value of harvested datasets is now attributed to the dataset's distributor instead of its producer. This change affects all newly harvested datasets. For more information, see https://github.com/IQSS/dataverse/pull/9013 +- As of Dataverse 6.5, the publisher value of harvested datasets is now attributed to the dataset's distributor instead of its producer. This change affects all newly harvested datasets. For more information, see https://github.com/IQSS/dataverse/pull/9013 Harvesting Non-OAI-PMH ~~~~~~~~~~~~~~~~~~~~~~ From acda4587df7cf7fa176be8adbfb5070c467bf074 Mon Sep 17 00:00:00 2001 From: Philip Durbin Date: Wed, 22 Jan 2025 13:57:12 -0500 Subject: [PATCH 14/14] bump sql script version #8739 --- src/main/resources/db/migration/{V6.5.0.2.sql => V6.5.0.3.sql} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/main/resources/db/migration/{V6.5.0.2.sql => V6.5.0.3.sql} (100%) diff --git a/src/main/resources/db/migration/V6.5.0.2.sql b/src/main/resources/db/migration/V6.5.0.3.sql similarity index 100% rename from src/main/resources/db/migration/V6.5.0.2.sql rename to src/main/resources/db/migration/V6.5.0.3.sql