Skip to content

Commit

Permalink
#9991 log review request email
Browse files Browse the repository at this point in the history
  • Loading branch information
taslangraham committed Jul 19, 2024
1 parent d806c08 commit dafc86e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions classes/log/SubmissionEmailLogEventType.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = 0x4000000A;

// Copyeditor events 0x50000000
case COPYEDIT_NOTIFY_COPYEDITOR = 0x50000001;
Expand Down
7 changes: 7 additions & 0 deletions classes/submission/action/EditorAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -146,6 +147,12 @@ public function addReviewer($request, $submission, $reviewerId, &$reviewRound, $

try {
Mail::send($mailable);

Repo::emailLogEntry()->logMailable(
$round === 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(
Expand Down

0 comments on commit dafc86e

Please sign in to comment.