[OJS 3.3.0-8] Default Response Deadline in weeks instead of days

Hi to all!
I don’t know if this has already been reported, in the setting part of the reviewer, specifically in Workflow → Review → Setup, in the section dedicated to the “Default Response Deadline” the label indicates the numbers of days to accept or decline a review, but I noticed that when the email arrived, the date indicated was not days but weeks. Going to check the function that handles this control, in the “ReviewerForm.inc.php” file, I found the function “strtotime(‘+’ . $numWeeks . ’ week’);” which actually marks weeks.
To be consistent with the label that defines days, it should be: “strtotime(‘+’ . $numWeeks . ’ days’);”

Doing a test like this the acceptance date is right. Some programmer could verify this?

Thanks for the support!

Bye
Tiziano

Hi @Tiziano

I’ve added your request to the Github open issue which is related to the time range label regarding days/weeks.

You can see the issue from the link

Best,
Israel

1 Like

Hi @israel.cefrin , I saw, thanks!

For the moment, I can fix the problem by changing the function from “weeks” to “days” and it should be fine.

Bye
Tiziano

1 Like

@Tiziano, I’m having trouble spotting this problem in the 3.3.0-x codebase. Are you sure you haven’t modified your translation files? In 3.3.0-8, the text refers to the number of weeks (as expected) not days.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher , the translation file I didn’t change it, I just located the function that handles the date and changed it from “weeks” to “days,” ran tests and from the reviewer’s acceptance request it calculates exactly three days for me to respond.

Hi @Tiziano,

I’m just confused about where the “days” language on the form is coming from, when it should be “weeks” (matching the code). Are you using another language than English? Can you send me a screenshot of that form?

Thanks,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher sure, I try to explain as best as I can, in one of our installed version of OJS, precisely 3.3.0.8 we have the form of accepting revisions, precisely this:

Schermata 2022-07-18 alle 09.01.28

Workflow → Review → Setup, in the section dedicated to the “Default Response Deadline” the label indicates the numbers of days to accept or decline a review.
Instead we noticed that it is not days but weeks, I point out that we have not changed the text.

To fix this, I found the function that handles this control, in the “ReviewerForm.inc.php” file, this:

strtotime(‘+’ . $numWeeks . ’ week’);

To be consistent with the label I changed “weeks” to “days”.

I didn’t make any other changes because by doing tests, we saw that it was calculating the days and we were fine with that.

Let me know your opinion.

Thanks!
Bye
Tiziano

Hi @Tiziano,

At some point your OJS 3.3.0-8 must’ve been modified away from the normal text. In 3.3.0-8 the text refers to “weeks” rather than “days”. In any case, I don’t think there’s a bug in 3.3.0-8, and your resolution on your own installation should change the code to match the text.

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like

Thanks @asmecher! I will check this in future versions.

Thanks for the support
Bye
Tiziano

This topic was automatically closed after 11 days. New replies are no longer allowed.