Colouring overdue reviews

On the summary page for Submissions in Review, I’m not getting any coloring of the papers on which reviews are overdue. This seems to have been reported in 2013:

http://pkp.sfu.ca/support/forum/viewtopic.php?f=2&t=10044

And a bug report was opened and then closed (the maintainer couldn’t replicate it). Does anyone else have this problem?

Playing around with Developer mode shows that the table rows that do have highligting are given special styles (highlightReviewerNotNotified, highlightNoDecision, highlightRevisedCopyUploaded) but the late reviews are not.

Hi @Pat_Morin,

I’m assuming you’re asking about OJS? What version are you running?

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

Yes, we using OJS:

2.4.5.0 (October 28, 2014 - 12:11 PM)

Cheers,
Pat

Hi @Pat_Morin,

If you’re handy with PHP, can you try stepping through (and perhaps adding some error_log output) to the code that determines the highlight status? For the review overdue condition, that’s here:

Regards,
Alec Smecher
Public Knowledge Project Team

Hi there,
We are using OJS 2.4.3 and I’ve always been puzzled why the two conditions “Reviewer is overdue to confirm peer review invitation” and “Reviewer is overdue to complete review” would never highlight, whereas the others conditions did highlight properly. I note that there was at least one thread on this topic on the old forum site:
http://pkp.sfu.ca/support/forum/viewtopic.php?f=9&t=11298

Looking at the SectionEditorSubmission class, the relevant code appears to be (for the second case, lines 718-722 above):

$overdueSeconds = 60 * 60 * 24 * 14; // Two weeks

if (!$reviewAssignment->getDateCompleted() &&
   $dateConfirmed &&
   !$journal->getSetting(‘remindForSubmit’) &&
   max($dateReminded, $dateConfirmed) + $overdueSeconds < time()
) return ‘highlightReviewerCompletionOverdue’;

So the blue highlighting is only applied if the Review Reminder journal setting (remindForSubmit in Setup 2.2) is turned off. Turning this setting off makes the blue highlighting appear. So I’ve removed the remindForSubmit condition from the code in our installation as we want to cue both the reviewers and the SEs regarding late reviews.

The other aspect to this is that the highlighting is activated two weeks after the dateReminded or dateConfirmed have passed and this is hard coded into the method. I prefer to have it activate as soon as the the grace period has passed beyond the review’s due date [i.e. something like strtotime($reviewAssignment->getDateDue()) + $journal->getSetting(‘numDaysBeforeSubmitReminder’) * 60 * 60 * 24 < time() ].

A parallel situation exists for the invite reminder in lines 712-716 above.
Cheers,
Roger

Hi @rkemp,

If you think your improvements might be broadly useful, mind submitting a pull request from github with the change?

Thanks,
Alec Smecher
Public Knowledge Project Team

Hi @rkemp and @asmecher

I am just wondering: Did the pull request happen? And did the OJS maintainters really pull it? The 2.4.6 codebase seems to contain the same (wrong, IMHO) logic as 2.4.3.

Was there a reason to make the highlighting dependent on $journal->getSetting('remindForSubmit') and $journal->getSetting('remindForInvite')? Isn’t it just a misinterpreted condition, or an attempt to take into account the possibility of $dateReminded being set twice, once as a review invitation reminder and once as a review submission reminder?

I have now spent some time debugging and dumping the information about reviews and may have a solution that should work in general, but this place is probably not intended for such discussions. Shall I use the issue tracker on GitHub for this purpose?

Jan

Hi Jan,
I wasn’t in git-space so I didn’t send a pull request. For our own system, I ended up uncoupling the colouring of reviews from the other journal settings by creating a new journal manager settable parameter–numDaysLateForHighlighting.

For late review highlighting I added the following:

  1. Argument in JournalSetupStep2Form.inc.php (~line 33)
  2. Key to manager.xml
  3. Input field to manager/setup/step2.tpl
  4. Replacement code ~line 720 below to SectionEditorSubmission.inc.php

// Check whether a reviewer is overdue to complete review
if (!$reviewAssignment->getDateCompleted() && $dateConfirmed &&
strtotime($reviewAssignment->getDateDue()) + $journal->getSetting(‘numDaysLateForHighlighting’) * 60 * 60 * 24 < time() ) return ‘highlightReviewerCompletionOverdue’;

For ignored invitations, I modified ~line 712:
// Check whether a reviewer is overdue to confirm invitation
if (!$reviewAssignment->getDateCompleted() && !$dateConfirmed &&
$dateNotified + $journal->getSetting(‘numDaysBeforeInviteReminder’) * 60 * 60 * 24 < time() ) return ‘highlightReviewerConfirmationOverdue’;

Hope this helps,
Roger

Hi @rkemp,

Could you turn this into a pull request? If you’re swamped, let me know and I can.

Thanks,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

I am running OJS-2.4.7.1 and have the same issue.
It looks like the fix was never applied. I just commented out line 720 and highlighting worked.

Is there a patch for this issue that I can apply to all of my journals?

Thanks,
Edward

Has there been any solution to this? I am currently having the same trouble. There is no highlighting appearing on any of your journal reviews. Should I just comment out line 720 as well?

Hi all,

See [OJS] Highlight overdue reviews even if email reminders enabled · Issue #1308 · pkp/pkp-lib · GitHub. There is a patch there, and the change will be included in OJS 2.4.9.

Regards,
Alec Smecher
Public Knowledge Project Team

Thanks! It is working now!

Hi @asmecher, @rkemp ,
the PR #1308 that you linked is about removing the two weeks grace period.

I tried to apply the modification suggested by @rkemp

For ignored invitations, I modified ~line 712:
// Check whether a reviewer is overdue to confirm invitation
if (!$reviewAssignment->getDateCompleted() && !$dateConfirmed &&
$dateNotified + $journal->getSetting(‘numDaysBeforeInviteReminder’) < time() ) return ‘highlightReviewerConfirmationOverdue’;

but I get all the submission with ignored invitations highlighted, also if the days “numDaysBeforeInviteReminder” are not expired yet (please note that I removed the * 60 * 60 * 24 grace period).

Actually, also with the code available in git, on the branch ojs-dev-2_4 i get the same results (all ignored invitation highlighted regardless the real deadline):

// Check whether a reviewer is overdue to confirm invitation
if (!$reviewAssignment->getDateCompleted() &&
	!$dateConfirmed &&
	max($dateReminded, $dateNotified) < time()
) return 'highlightReviewerConfirmationOverdue';

Thanks,
andrea

Hi Andrea,
I’m not sure if I understand your intent. time() is measured in seconds. So multiplying the journal setting numDaysBeforeInviteReminder by 606024 is necessary to convert the grace period into seconds. Otherwise that setting, which is meant to represent DAYS, is interpreted as seconds, and entries become highlighted almost immediately after the request is sent.

If you want to experiment, without having to do the coding to create a new journal parameter, replace the code above with something simpler:

                    if (!$reviewAssignment->getDateCompleted() &&
                        !$dateConfirmed &&
                        $dateNotified + 86400 < time()
                    ) return 'highlightReviewerConfirmationOverdue';

The logic reads “If the interaction with the reviewer is not complete and they have not confirmed/responded and the instant of notification is earlier in time than this moment by one day THEN highlight”

This would colour entries with ignored invitations one day (86400 seconds) after the invitation is sent. Change this value as you wish.
Roger

Hi @rkemp,
thank you to pointing me it out.

In the meanwhile I tried a more generalised solution that I committed here

Do you think that this is ok?

Thanks,
andrea

1 Like

Hi @marchitelli, your fix seems to respect the set dates, resulting in coloring only those that are truly overdue. Thanks!

Hi all,

Thanks, @marchitelli, for the commit – and @AlesKladnik for the feedback. @marchitelli, would you mind sending in a PR with that commit so we can review/merge it?

Thanks,
Alec Smecher
Public Knowledge Project Team