diff --git a/orcid-core/src/main/java/org/orcid/core/manager/impl/PeerReviewManagerImpl.java b/orcid-core/src/main/java/org/orcid/core/manager/impl/PeerReviewManagerImpl.java index 1b66a8ceb4e..58d161de081 100644 --- a/orcid-core/src/main/java/org/orcid/core/manager/impl/PeerReviewManagerImpl.java +++ b/orcid-core/src/main/java/org/orcid/core/manager/impl/PeerReviewManagerImpl.java @@ -175,7 +175,7 @@ public PeerReview updatePeerReview(String orcid, PeerReview peerReview, boolean existingEntity = peerReviewDao.merge(existingEntity); peerReviewDao.flush(); - notificationManager.sendAmendEmail(orcid, AmendedSection.PEER_REVIEW, createItemList(existingEntity, ActionType.UPDATE)); + notificationManager.sendAmendEmail(orcid, AmendedSection.PEER_REVIEW, createItemList(existingEntity, ActionType.UPDATE, peerReview.getExternalIdentifiers(), peerReview.getSubjectExternalIdentifier())); return jpaJaxbPeerReviewAdapter.toPeerReview(existingEntity); } @@ -238,10 +238,6 @@ private void validateGroupId(PeerReview peerReview) { } } - private List createItemList(PeerReviewEntity peerReviewEntity, ActionType type) { - return createItemList(peerReviewEntity, type, null, null); - } - private List createItemList(PeerReviewEntity peerReviewEntity, ActionType type, ExternalIDs extIds, ExternalID subjectExtId) { Item item = new Item(); item.setItemType(ItemType.PEER_REVIEW); diff --git a/orcid-core/src/main/java/org/orcid/core/manager/impl/WorkManagerImpl.java b/orcid-core/src/main/java/org/orcid/core/manager/impl/WorkManagerImpl.java index 1b3455e5020..6838819d1a5 100644 --- a/orcid-core/src/main/java/org/orcid/core/manager/impl/WorkManagerImpl.java +++ b/orcid-core/src/main/java/org/orcid/core/manager/impl/WorkManagerImpl.java @@ -418,10 +418,11 @@ public boolean checkSourceAndRemoveWork(String orcid, Long workId) { boolean result = true; WorkEntity workEntity = workDao.getWork(orcid, workId); orcidSecurityManager.checkSource(workEntity); + Work work = jpaJaxbWorkAdapter.toWork(workEntity); try { workDao.removeWork(orcid, workId); workDao.flush(); - notificationManager.sendAmendEmail(orcid, AmendedSection.WORK, createItemList(workEntity, null, ActionType.DELETE)); + notificationManager.sendAmendEmail(orcid, AmendedSection.WORK, createItemList(workEntity, work.getExternalIdentifiers(), ActionType.DELETE)); } catch (Exception e) { LOGGER.error("Unable to delete work with ID: " + workId); result = false;