mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-15 05:53:08 +00:00
Merge pull request #9527 from DSpace/backport-9387-to-main
[Port main] Fix #9383: Set email subject for request copy form
This commit is contained in:
@@ -395,7 +395,7 @@ public class Email {
|
|||||||
for (String headerName : templateHeaders) {
|
for (String headerName : templateHeaders) {
|
||||||
String headerValue = (String) vctx.get(headerName);
|
String headerValue = (String) vctx.get(headerName);
|
||||||
if ("subject".equalsIgnoreCase(headerName)) {
|
if ("subject".equalsIgnoreCase(headerName)) {
|
||||||
if (null != headerValue) {
|
if ((subject == null || subject.isEmpty()) && null != headerValue) {
|
||||||
subject = headerValue;
|
subject = headerValue;
|
||||||
}
|
}
|
||||||
} else if ("charset".equalsIgnoreCase(headerName)) {
|
} else if ("charset".equalsIgnoreCase(headerName)) {
|
||||||
|
@@ -247,11 +247,15 @@ public class RequestItemRepository
|
|||||||
message = responseMessageNode.asText();
|
message = responseMessageNode.asText();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
JsonNode responseSubjectNode = requestBody.findValue("subject");
|
||||||
|
String subject = null;
|
||||||
|
if (responseSubjectNode != null && !responseSubjectNode.isNull()) {
|
||||||
|
subject = responseSubjectNode.asText();
|
||||||
|
}
|
||||||
ri.setDecision_date(new Date());
|
ri.setDecision_date(new Date());
|
||||||
requestItemService.update(context, ri);
|
requestItemService.update(context, ri);
|
||||||
|
|
||||||
// Send the response email
|
// Send the response email
|
||||||
String subject = requestBody.findValue("subject").asText();
|
|
||||||
try {
|
try {
|
||||||
requestItemEmailNotifier.sendResponse(context, ri, subject, message);
|
requestItemEmailNotifier.sendResponse(context, ri, subject, message);
|
||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
|
Reference in New Issue
Block a user