Skip to content

Commit

Permalink
pkp#10214 fixed the x days older comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
touhidurabir committed Feb 18, 2025
1 parent 9559059 commit b68d703
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions jobs/email/EditorialReminder.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
use APP\notification\Notification;
use APP\notification\NotificationManager;
use APP\submission\Submission;
use Carbon\Carbon;
use Illuminate\Support\Facades\Mail;
use PKP\context\Context;
use PKP\db\DAORegistry;
Expand Down Expand Up @@ -114,8 +115,9 @@ public function handle(): void
}

if (in_array($submission->getData('stageId'), [WORKFLOW_STAGE_ID_EDITING, WORKFLOW_STAGE_ID_PRODUCTION])) {
$lastActivityTimestamp = strtotime($submission->getData('dateLastActivity'));
if ($lastActivityTimestamp < strtotime('-30 days')) {
$lastActivityTimestamp = Carbon::parse($submission->getData('dateLastActivity'))->endOfDay();
$comparingTimestamp = Carbon::today()->endOfDay()->subDays(30);
if ($comparingTimestamp->gt($lastActivityTimestamp)) {
/** @var WorkflowStageDAO $workflowStageDao */
$workflowStageDao = DAORegistry::getDAO('WorkflowStageDAO');
$outstanding[$submissionId] = __(
Expand Down

0 comments on commit b68d703

Please sign in to comment.