Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editorial Reminder: miscalculation for inactiveDays (I think) #10376

Open
forgive38 opened this issue Sep 9, 2024 · 3 comments
Open

Editorial Reminder: miscalculation for inactiveDays (I think) #10376

forgive38 opened this issue Sep 9, 2024 · 3 comments

Comments

@forgive38
Copy link
Contributor

Describe the bug
I think that the list of inactive submissions to the copyediting and production stages in the Editorial Reminder email is not the one that should appear.

Here's what I think is wrong:

diff --git a/jobs/email/EditorialReminder.php b/jobs/email/EditorialReminder.php
index fca40c30c7..c66f278579 100644
--- a/jobs/email/EditorialReminder.php
+++ b/jobs/email/EditorialReminder.php
@@ -115,7 +115,7 @@ class EditorialReminder extends BaseJob
 
             if (in_array($submission->getData('stageId'), [WORKFLOW_STAGE_ID_EDITING, WORKFLOW_STAGE_ID_PRODUCTION])) {
                 $lastActivityTimestamp = strtotime($submission->getData('dateLastActivity'));
-                if ($lastActivityTimestamp < strtotime('+30 days')) {
+                if ($lastActivityTimestamp < strtotime('-30 days')) {
                     /** @var WorkflowStageDAO $workflowStageDao */
                     $workflowStageDao = DAORegistry::getDAO('WorkflowStageDAO');
                     $outstanding[$submissionId] = __(

forgive38 pushed a commit to forgive38/pkp-lib that referenced this issue Sep 9, 2024
@asmecher
Copy link
Member

asmecher commented Sep 9, 2024

@bozana, could you have a look at this one?

@bozana
Copy link
Collaborator

bozana commented Sep 16, 2024

Hi @forgive38, sorry for my delay -- I haven't managed to take a look :-( I will be away for some days -- so even more delay to come :-( -- but I will come to this as soon as possible.
Thanks for understanding!

@bozana
Copy link
Collaborator

bozana commented Sep 23, 2024

Hi @forgive38, I finally took a look, sorry for the delay :-(
Yes, I think you are right :-)
Would you like to make a PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants