Skip to content

Commit

Permalink
pkp#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 40acfd8 commit 6ab6427
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions classes/log/SubmissionEmailLogEntry.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ class SubmissionEmailLogEntry extends EmailLogEntry
public const SUBMISSION_EMAIL_REVIEW_CONFIRM = 0x40000005;
public const SUBMISSION_EMAIL_REVIEW_DECLINE = 0x40000006;
public const SUBMISSION_EMAIL_REVIEW_CONFIRM_ACK = 0x40000008;
public const SUBMISSION_EMAIL_REVIEW_REQUEST = 0x40000009;
public const SUBMISSION_EMAIL_REVIEW_REQUEST_SUBSEQUENT = 0x4000000A;

// Copyeditor events 0x50000000
public const SUBMISSION_EMAIL_COPYEDIT_NOTIFY_COPYEDITOR = 0x50000001;
Expand Down
9 changes: 9 additions & 0 deletions classes/submission/action/EditorAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
use PKP\core\PKPString;
use PKP\db\DAORegistry;
use PKP\log\event\PKPSubmissionEventLogEntry;
use PKP\log\SubmissionEmailLogDAO;
use PKP\log\SubmissionEmailLogEntry;
use PKP\mail\mailables\ReviewRequest;
use PKP\mail\mailables\ReviewRequestSubsequent;
use PKP\mail\variables\ReviewAssignmentEmailVariable;
Expand Down Expand Up @@ -137,6 +139,13 @@ public function addReviewer($request, $submission, $reviewerId, &$reviewRound, $

try {
Mail::send($mailable);

/** @var SubmissionEmailLogDAO $submissionEmailLogDao */
$submissionEmailLogDao = DAORegistry::getDAO('SubmissionEmailLogDAO');
$submissionEmailLogDao->logMailable(
$round === ReviewRound::REVIEW_ROUND_STATUS_REVISIONS_REQUESTED
? SubmissionEmailLogEntry::SUBMISSION_EMAIL_REVIEW_REQUEST
: SubmissionEmailLogEntry::SUBMISSION_EMAIL_REVIEW_REQUEST_SUBSEQUENT, $mailable, $submission, $user);
} catch (TransportException $e) {
$notificationMgr = new PKPNotificationManager();
$notificationMgr->createTrivialNotification(
Expand Down

0 comments on commit 6ab6427

Please sign in to comment.