From e0bc2eb589b869f4f6de0dc817698add4f457999 Mon Sep 17 00:00:00 2001 From: Giuseppe Digilio Date: Wed, 6 Mar 2024 08:44:06 +0100 Subject: [PATCH 1/2] [DSC-1550] Add missing SupervisionOrder discovery configuration --- dspace/config/spring/api/discovery.xml | 82 +++++++++++++++++++++++++- 1 file changed, 79 insertions(+), 3 deletions(-) diff --git a/dspace/config/spring/api/discovery.xml b/dspace/config/spring/api/discovery.xml index de6145afd67d..3c7a70cf9e03 100644 --- a/dspace/config/spring/api/discovery.xml +++ b/dspace/config/spring/api/discovery.xml @@ -61,9 +61,6 @@ dc.contributor.editor - - - @@ -72,6 +69,9 @@ + + + @@ -91,6 +91,7 @@ + @@ -785,6 +786,81 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + search.resourcetype:WorkspaceItem AND supervised:true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Date: Mon, 11 Mar 2024 15:00:41 +0100 Subject: [PATCH 2/2] [DSC-1587] Add check for item submitter --- .../org/dspace/app/rest/converter/EditItemConverter.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dspace-server-webapp/src/main/java/org/dspace/app/rest/converter/EditItemConverter.java b/dspace-server-webapp/src/main/java/org/dspace/app/rest/converter/EditItemConverter.java index f19ce63d6b5f..8a2135e032bb 100644 --- a/dspace-server-webapp/src/main/java/org/dspace/app/rest/converter/EditItemConverter.java +++ b/dspace-server-webapp/src/main/java/org/dspace/app/rest/converter/EditItemConverter.java @@ -7,6 +7,7 @@ */ package org.dspace.app.rest.converter; +import java.util.Objects; import javax.servlet.http.HttpServletRequest; import org.apache.logging.log4j.Logger; @@ -138,7 +139,9 @@ protected void fillFromModel(EditItem obj, EditItemRest rest, Projection project } rest.setCollection(collection != null ? converter.toRest(collection, projection) : null); rest.setItem(converter.toRest(item, projection)); - rest.setSubmitter(converter.toRest(submitter, projection)); + if (Objects.nonNull(submitter)) { + rest.setSubmitter(converter.toRest(submitter, projection)); + } } private void addValidationErrorsToItem(EditItem obj, EditItemRest rest) {