diff --git a/classes/log/SubmissionEmailLogEventType.php b/classes/log/SubmissionEmailLogEventType.php index bae48ce77f9..cf7ff72f512 100644 --- a/classes/log/SubmissionEmailLogEventType.php +++ b/classes/log/SubmissionEmailLogEventType.php @@ -39,6 +39,8 @@ enum SubmissionEmailLogEventType: int implements EmailLogEventType case REVIEW_CONFIRM = 0x40000005; case REVIEW_DECLINE = 0x40000006; case REVIEW_CONFIRM_ACK = 0x40000008; + case SUBMISSION_EMAIL_REVIEW_REQUEST = 0x40000009; + case SUBMISSION_EMAIL_REVIEW_REQUEST_SUBSEQUENT = 0x40000010; // Copyeditor events 0x50000000 case COPYEDIT_NOTIFY_COPYEDITOR = 0x50000001; diff --git a/classes/submission/action/EditorAction.php b/classes/submission/action/EditorAction.php index 78c85fd3190..dfc6994338a 100644 --- a/classes/submission/action/EditorAction.php +++ b/classes/submission/action/EditorAction.php @@ -30,6 +30,7 @@ use PKP\db\DAORegistry; use PKP\invitation\invitations\ReviewerAccessInvite; use PKP\log\event\PKPSubmissionEventLogEntry; +use PKP\log\SubmissionEmailLogEventType; use PKP\mail\mailables\ReviewRequest; use PKP\mail\mailables\ReviewRequestSubsequent; use PKP\notification\PKPNotification; @@ -146,6 +147,12 @@ public function addReviewer($request, $submission, $reviewerId, &$reviewRound, $ try { Mail::send($mailable); + + Repo::emailLogEntry()->logMailable( + $reviewRound->getRound() === ReviewRound::REVIEW_ROUND_STATUS_REVISIONS_REQUESTED + ? SubmissionEmailLogEventType::SUBMISSION_EMAIL_REVIEW_REQUEST + : SubmissionEmailLogEventType::SUBMISSION_EMAIL_REVIEW_REQUEST_SUBSEQUENT, + $mailable, $submission, $user); } catch (TransportException $e) { $notificationMgr = new PKPNotificationManager(); $notificationMgr->createTrivialNotification(