mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 01:54:22 +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) {
|
||||
String headerValue = (String) vctx.get(headerName);
|
||||
if ("subject".equalsIgnoreCase(headerName)) {
|
||||
if (null != headerValue) {
|
||||
if ((subject == null || subject.isEmpty()) && null != headerValue) {
|
||||
subject = headerValue;
|
||||
}
|
||||
} else if ("charset".equalsIgnoreCase(headerName)) {
|
||||
|
@@ -247,11 +247,15 @@ public class RequestItemRepository
|
||||
message = responseMessageNode.asText();
|
||||
}
|
||||
|
||||
JsonNode responseSubjectNode = requestBody.findValue("subject");
|
||||
String subject = null;
|
||||
if (responseSubjectNode != null && !responseSubjectNode.isNull()) {
|
||||
subject = responseSubjectNode.asText();
|
||||
}
|
||||
ri.setDecision_date(new Date());
|
||||
requestItemService.update(context, ri);
|
||||
|
||||
// Send the response email
|
||||
String subject = requestBody.findValue("subject").asText();
|
||||
try {
|
||||
requestItemEmailNotifier.sendResponse(context, ri, subject, message);
|
||||
} catch (IOException ex) {
|
||||
|
Reference in New Issue
Block a user