From b063ddd4eb15bf731b50f5114294046bf0b719d9 Mon Sep 17 00:00:00 2001 From: eskander Date: Fri, 28 Jun 2024 16:04:57 +0300 Subject: [PATCH 1/2] [DSC-1774] Display multiple affiliation & Alternative Names --- dspace/config/modules/discovery.cfg | 1 + .../config/spring/rest/cris-authority-metadatagenerator.xml | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/dspace/config/modules/discovery.cfg b/dspace/config/modules/discovery.cfg index bdaa7b6042c5..35997d4a9e2f 100644 --- a/dspace/config/modules/discovery.cfg +++ b/dspace/config/modules/discovery.cfg @@ -29,6 +29,7 @@ discovery.index.projection=dc.contributor.* discovery.index.projection=dc.date.issued discovery.index.projection=person.affiliation.name discovery.index.projection=person.identifier.orcid +discovery.index.projection=oairecerif.person.affiliation # Allow auto-reindexing. # If any database migrations are applied to your database (via Flyway), then a diff --git a/dspace/config/spring/rest/cris-authority-metadatagenerator.xml b/dspace/config/spring/rest/cris-authority-metadatagenerator.xml index e38b9c7beda0..dd75a5dbbd43 100644 --- a/dspace/config/spring/rest/cris-authority-metadatagenerator.xml +++ b/dspace/config/spring/rest/cris-authority-metadatagenerator.xml @@ -24,9 +24,9 @@ - - - + + + From e739ffd1dac09e48214cf1a691ad26f0d179b7b6 Mon Sep 17 00:00:00 2001 From: eskander Date: Fri, 28 Jun 2024 19:14:44 +0300 Subject: [PATCH 2/2] [DSC-1774] fixing broken ITs --- .../java/org/dspace/app/rest/ItemAuthorityIT.java | 15 +++++++++------ .../org/dspace/app/rest/OrcidAuthorityIT.java | 3 +++ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/dspace-server-webapp/src/test/java/org/dspace/app/rest/ItemAuthorityIT.java b/dspace-server-webapp/src/test/java/org/dspace/app/rest/ItemAuthorityIT.java index 81e428d970ed..2659634fa361 100644 --- a/dspace-server-webapp/src/test/java/org/dspace/app/rest/ItemAuthorityIT.java +++ b/dspace-server-webapp/src/test/java/org/dspace/app/rest/ItemAuthorityIT.java @@ -100,17 +100,20 @@ public void singleItemAuthorityTest() throws Exception { .withTitle("Author 1") .withEntityType("person") .withPersonMainAffiliation(orgUnit_1.getName(), orgUnit_1.getID().toString()) + .withPersonAffiliation(orgUnit_1.getName(), orgUnit_1.getID().toString()) .build(); Item author_2 = ItemBuilder.createItem(context, col1) .withTitle("Author 2") .withPersonMainAffiliation(orgUnit_1.getName(), orgUnit_1.getID().toString()) + .withPersonAffiliation(orgUnit_1.getName(), orgUnit_1.getID().toString()) .withEntityType("person") .build(); Item author_3 = ItemBuilder.createItem(context, col1) .withTitle("Author 3") .withPersonMainAffiliation(orgUnit_2.getName(), orgUnit_2.getID().toString()) + .withPersonAffiliation(orgUnit_2.getName(), orgUnit_2.getID().toString()) .withEntityType("person") .build(); @@ -162,19 +165,19 @@ public void alternativeNamesAuthorityTest() throws Exception { .withTitle("Author 1") .withVariantName("Author Variant") .withEntityType("person") - .withPersonMainAffiliation(orgUnit_1.getName(), orgUnit_1.getID().toString()) + .withPersonAffiliation(orgUnit_1.getName(), orgUnit_1.getID().toString()) .build(); Item author_2 = ItemBuilder.createItem(context, col1) .withTitle("Author 2") .withVariantName("Author 2 Variant") - .withPersonMainAffiliation(orgUnit_1.getName(), orgUnit_1.getID().toString()) + .withPersonAffiliation(orgUnit_1.getName(), orgUnit_1.getID().toString()) .withEntityType("person") .build(); Item author_3 = ItemBuilder.createItem(context, col1) .withTitle("Author 3") - .withPersonMainAffiliation(orgUnit_1.getName(), orgUnit_1.getID().toString()) + .withPersonAffiliation(orgUnit_1.getName(), orgUnit_1.getID().toString()) .withEntityType("person") .build(); @@ -247,14 +250,14 @@ public void multiItemAuthorityTest() throws Exception { Item author_1 = ItemBuilder.createItem(context, col1) .withTitle("Author 1") - .withPersonMainAffiliation(orgUnit_1.getName(), orgUnit_1.getID().toString()) - .withPersonMainAffiliation(orgUnit_2.getName(), orgUnit_2.getID().toString()) + .withPersonAffiliation(orgUnit_1.getName(), orgUnit_1.getID().toString()) + .withPersonAffiliation(orgUnit_2.getName(), orgUnit_2.getID().toString()) .withEntityType("person") .build(); Item author_2 = ItemBuilder.createItem(context, col1) .withTitle("Author 2") - .withPersonMainAffiliation(orgUnit_2.getName(), orgUnit_2.getID().toString()) + .withPersonAffiliation(orgUnit_2.getName(), orgUnit_2.getID().toString()) .withEntityType("person") .build(); diff --git a/dspace-server-webapp/src/test/java/org/dspace/app/rest/OrcidAuthorityIT.java b/dspace-server-webapp/src/test/java/org/dspace/app/rest/OrcidAuthorityIT.java index f05587d1c901..cf21c7538a90 100644 --- a/dspace-server-webapp/src/test/java/org/dspace/app/rest/OrcidAuthorityIT.java +++ b/dspace-server-webapp/src/test/java/org/dspace/app/rest/OrcidAuthorityIT.java @@ -770,12 +770,14 @@ public void testMultipleSourcesReferences() throws Exception { Item author_1 = ItemBuilder.createItem(context, col1) .withTitle("Author 1") .withPersonMainAffiliation(orgUnit_1.getName(), orgUnit_1.getID().toString()) + .withPersonAffiliation(orgUnit_1.getName(), orgUnit_1.getID().toString()) .withEntityType("person") .build(); Item author_2 = ItemBuilder.createItem(context, col1) .withTitle("Author 2") .withPersonMainAffiliation(orgUnit_2.getName(), orgUnit_2.getID().toString()) + .withPersonAffiliation(orgUnit_2.getName(), orgUnit_2.getID().toString()) .withEntityType("person") .build(); @@ -883,6 +885,7 @@ private Item buildPerson(String title, Item affiliation) { .withTitle(title) .withEntityType("Person") .withPersonMainAffiliation(affiliation.getName(), affiliation.getID().toString()) + .withPersonAffiliation(affiliation.getName(), affiliation.getID().toString()) .build(); }