diff --git a/classes/components/forms/context/PKPReviewSetupForm.php b/classes/components/forms/context/PKPReviewSetupForm.php index c98ba682a3d..395ed468cf1 100644 --- a/classes/components/forms/context/PKPReviewSetupForm.php +++ b/classes/components/forms/context/PKPReviewSetupForm.php @@ -98,11 +98,23 @@ public function __construct($action, $locales, $context) 'value' => $context->getData('numDaysBeforeInviteReminder'), 'size' => 'small', ])) + ->addField(new FieldText('numOccurrencesForInviteReminder', [ + 'label' => __('manager.setup.reviewOptions.occurrencesForInvite'), + 'description' => __('manager.setup.reviewOptions.occurrencesForInvite.description'), + 'value' => $context->getData('numOccurrencesForInviteReminder'), + 'size' => 'small', + ])) ->addField(new FieldText('numDaysBeforeSubmitReminder', [ 'label' => __('manager.setup.reviewOptions.reminders.submit'), 'description' => __('manager.setup.reviewOptions.reminders.submit.description'), 'value' => $context->getData('numDaysBeforeSubmitReminder'), 'size' => 'small', + ])) + ->addField(new FieldText('numOccurrencesForSubmitReminder', [ + 'label' => __('manager.setup.reviewOptions.occurrencesForSubmit'), + 'description' => __('manager.setup.reviewOptions.occurrencesForSubmit.description'), + 'value' => $context->getData('numOccurrencesForSubmitReminder'), + 'size' => 'small', ])); } else { $this->addField(new FieldHTML('reviewRemindersDisabled', [ diff --git a/classes/controllers/grid/users/reviewer/PKPReviewerGridHandler.php b/classes/controllers/grid/users/reviewer/PKPReviewerGridHandler.php index 31cb644e837..ff297bf6bce 100644 --- a/classes/controllers/grid/users/reviewer/PKPReviewerGridHandler.php +++ b/classes/controllers/grid/users/reviewer/PKPReviewerGridHandler.php @@ -50,6 +50,7 @@ use PKP\mail\mailables\ReviewerReinstate; use PKP\mail\mailables\ReviewerResendRequest; use PKP\mail\mailables\ReviewerUnassign; +use PKP\mail\mailables\ReviewRemindAuto; use PKP\mail\traits\Sender; use PKP\notification\NotificationDAO; use PKP\notification\PKPNotification; @@ -979,7 +980,8 @@ public function reviewHistory($args, $request) $dates = [ 'common.assigned' => $reviewAssignment->getDateAssigned(), 'common.notified' => $reviewAssignment->getDateNotified(), - 'common.reminder' => $reviewAssignment->getDateReminded(), + 'common.invite.reminder' => $reviewAssignment->getDateInviteReminded(), + 'common.submit.reminder' => $reviewAssignment->getDateSubmitReminded(), 'common.confirm' => $reviewAssignment->getDateConfirmed(), 'common.completed' => $reviewAssignment->getDateCompleted(), 'common.acknowledged' => $reviewAssignment->getDateAcknowledged(), @@ -1045,11 +1047,20 @@ public function fetchTemplateBody(array $args, PKPRequest $request): ?JSONMessag return null; } + $reviewAssignment = $this->getAuthorizedContextObject(Application::ASSOC_TYPE_REVIEW_ASSIGNMENT); + if ($mailable instanceof ReviewRemindAuto) { + $occurrence = $reviewAssignment->getCountSubmitReminder(); + } + else { + $occurrence = $reviewAssignment->getCountInviteReminder(); + } + $user = $request->getUser(); $mailable->sender($user); $mailable->addData([ 'messageToReviewer' => __('reviewer.step1.requestBoilerplate'), 'abstractTermIfEnabled' => ($this->getSubmission()->getLocalizedAbstract() == '' ? '' : __('common.abstract')), // Deprecated; for OJS 2.x templates + 'occurrence' => $occurrence, ]); $body = Mail::compileParams($template->getLocalizedData('body'), $mailable->getData(Locale::getLocale())); diff --git a/classes/migration/install/ReviewsMigration.php b/classes/migration/install/ReviewsMigration.php index 69b3434b44c..e3f0a73eb0a 100644 --- a/classes/migration/install/ReviewsMigration.php +++ b/classes/migration/install/ReviewsMigration.php @@ -71,7 +71,10 @@ public function up(): void $table->smallInteger('declined')->default(0); $table->smallInteger('cancelled')->default(0); $table->datetime('date_rated')->nullable(); - $table->datetime('date_reminded')->nullable(); + $table->datetime('date_invite_reminded')->nullable(); + $table->smallInteger('count_invite_reminder')->default(0); + $table->datetime('date_submit_reminded')->nullable(); + $table->smallInteger('count_submit_reminder')->default(0); $table->smallInteger('quality')->nullable(); $table->bigInteger('review_round_id'); diff --git a/classes/migration/upgrade/v3_5_0/I9455_ReviewRemindersOccurrences.php b/classes/migration/upgrade/v3_5_0/I9455_ReviewRemindersOccurrences.php new file mode 100644 index 00000000000..de89e8bb419 --- /dev/null +++ b/classes/migration/upgrade/v3_5_0/I9455_ReviewRemindersOccurrences.php @@ -0,0 +1,53 @@ +after('date_rated', function (Blueprint $table) { + $table->dateTime('date_invite_reminded')->nullable(); + $table->smallInteger('count_invite_reminder')->default(0); + }); + + // Rename date_reminded to date_submit_reminded to avoid confusion with another column with a similar name + $table->renameColumn('date_reminded', 'date_submit_reminded'); + + $table->after('date_reminded', function (Blueprint $table) { + $table->smallInteger('count_submit_reminder')->default(0); + }); + }); + } + + /** + * Reverse the migration. + */ + public function down(): void + { + Schema::table('review_assignments', function (Blueprint $table) { + $table->dropColumn('date_invite_reminded'); + $table->dropColumn('count_invite_reminder'); + $table->renameColumn('date_submit_reminded', 'date_reminded'); + $table->dropColumn('count_submit_reminder'); + }); + } +} diff --git a/classes/submission/reviewAssignment/DAO.php b/classes/submission/reviewAssignment/DAO.php index 54a5f029d4e..a7053896659 100644 --- a/classes/submission/reviewAssignment/DAO.php +++ b/classes/submission/reviewAssignment/DAO.php @@ -54,7 +54,10 @@ class DAO extends EntityDAO 'declined' => 'declined', 'cancelled' => 'cancelled', 'dateRated' => 'date_rated', - 'dateReminded' => 'date_reminded', + 'dateInviteReminded' => 'date_invite_reminded', + 'countInviteReminder' => 'count_invite_reminder', + 'dateSubmitReminded' => 'date_submit_reminded', + 'countSubmitReminder' => 'count_submit_reminder', 'quality' => 'quality', 'reviewRoundId' => 'review_round_id', 'stageId' => 'stage_id', diff --git a/classes/submission/reviewAssignment/ReviewAssignment.php b/classes/submission/reviewAssignment/ReviewAssignment.php index d87ee2de57e..6aba74db83a 100644 --- a/classes/submission/reviewAssignment/ReviewAssignment.php +++ b/classes/submission/reviewAssignment/ReviewAssignment.php @@ -418,23 +418,83 @@ public function setDateAcknowledged($dateAcknowledged) } /** - * Get the reviewer's last reminder date. + * Get the reviewer's last invite reminder date. * * @return string */ - public function getDateReminded() + public function getDateInviteReminded() { - return $this->getData('dateReminded'); + return $this->getData('dateInviteReminded'); } /** - * Set the reviewer's last reminder date. + * Set the reviewer's last invite reminder date. * - * @param string $dateReminded + * @param string $dateInviteReminded */ - public function setDateReminded($dateReminded) + public function setDateInviteReminded($dateInviteReminded) { - $this->setData('dateReminded', $dateReminded); + $this->setData('dateInviteReminded', $dateInviteReminded); + } + + /** + * Get the reviewer's invite reminder count. + * + * @return int + */ + function getCountInviteReminder() + { + return $this->getData('countInviteReminder'); + } + + /** + * Set the reviewer's invite reminder count. + * + * @param $countInviteReminder int + */ + function setCountInviteReminder($countInviteReminder) + { + $this->setData('countInviteReminder', $countInviteReminder); + } + + /** + * Get the reviewer's last submit reminder date. + * + * @return string + */ + function getDateSubmitReminded() + { + return $this->getData('dateSubmitReminded'); + } + + /** + * Set the reviewer's last submit reminder date. + * + * @param $dateSubmitReminded string + */ + function setDateSubmitReminded($dateSubmitReminded) + { + $this->setData('dateSubmitReminded', $dateSubmitReminded); + } + + /** + * Get the reviewer's submit reminder count. + * + * @return int + */ + function getCountSubmitReminder() + { + return $this->getData('countSubmitReminder'); + } + + /** + * Set the reviewer's submit reminder count. + * + * @param $countSubmitReminder int + */ + function setCountSubmitReminder($countSubmitReminder) + { + $this->setData('countSubmitReminder', $countSubmitReminder); } /** diff --git a/classes/submission/reviewer/ReviewerAction.php b/classes/submission/reviewer/ReviewerAction.php index e984cf8b94d..fbfa06ce452 100644 --- a/classes/submission/reviewer/ReviewerAction.php +++ b/classes/submission/reviewer/ReviewerAction.php @@ -90,7 +90,7 @@ public function confirmReview( } Repo::reviewAssignment()->edit($reviewAssignment, [ - 'dateReminded' => null, + 'dateSubmitReminded' => null, 'reminderWasAutomatic' => 0, 'declined' => $decline, 'dateConfirmed' => Core::getCurrentDate(), diff --git a/classes/task/ReviewReminder.php b/classes/task/ReviewReminder.php index e5523526b25..526407ecbee 100644 --- a/classes/task/ReviewReminder.php +++ b/classes/task/ReviewReminder.php @@ -75,16 +75,33 @@ public function sendReminder( $reviewInvitation->dispatch(); } + if ($mailable instanceof ReviewRemindAuto) { + $occurrence = $reviewAssignment->getCountSubmitReminder() + 1; + } + else { + $occurrence = $reviewAssignment->getCountInviteReminder() + 1; + } + // deprecated template variables OJS 2.x $mailable->addData([ 'messageToReviewer' => __('reviewer.step1.requestBoilerplate'), 'abstractTermIfEnabled' => ($submission->getLocalizedAbstract() == '' ? '' : __('common.abstract')), + 'occurrence' => $occurrence, ]); Mail::send($mailable); + if ($mailable instanceof ReviewRemindAuto) { + $dateFieldToUpdate = 'dateSubmitReminded'; + $countFieldToUpdate = 'countSubmitReminder'; + } + else { + $dateFieldToUpdate = 'dateInviteReminded'; + $countFieldToUpdate = 'countInviteReminder'; + } Repo::reviewAssignment()->edit($reviewAssignment, [ - 'dateReminded' => Core::getCurrentDate(), + $dateFieldToUpdate => Core::getCurrentDate(), + $countFieldToUpdate => $occurrence, 'reminderWasAutomatic' => 1 ]); @@ -114,12 +131,8 @@ public function executeActions() $incompleteAssignments = Repo::reviewAssignment()->getCollector()->filterByIsIncomplete(true)->getMany(); $inviteReminderDays = $submitReminderDays = null; + $occurrencesInviteReminder = $occurrencesSubmitReminder = null; foreach ($incompleteAssignments as $reviewAssignment) { - // Avoid review assignments that a reminder exists for. - if ($reviewAssignment->getDateReminded() !== null) { - continue; - } - // Fetch the submission if ($submission == null || $submission->getId() != $reviewAssignment->getSubmissionId()) { unset($submission); @@ -141,19 +154,36 @@ public function executeActions() $inviteReminderDays = $context->getData('numDaysBeforeInviteReminder'); $submitReminderDays = $context->getData('numDaysBeforeSubmitReminder'); + $occurrencesInviteReminder = $context->getData('numOccurrencesForInviteReminder'); + $occurrencesSubmitReminder = $context->getData('numOccurrencesForSubmitReminder'); } $mailable = null; - if ($submitReminderDays >= 1 && $reviewAssignment->getDateDue() != null) { - $checkDate = strtotime($reviewAssignment->getDateDue()); - if (time() - $checkDate > 60 * 60 * 24 * $submitReminderDays) { - $mailable = new ReviewRemindAuto($context, $submission, $reviewAssignment); + + $countSubmitReminder = $reviewAssignment->getCountSubmitReminder(); + if ($countSubmitReminder == 0 || !$occurrencesSubmitReminder || $countSubmitReminder < $occurrencesSubmitReminder) { + $dateDue = $reviewAssignment->getDateDue(); + if ($submitReminderDays >= 1 && $dateDue) { + $dateSubmitReminded = $reviewAssignment->getDateSubmitReminded(); + $time = $dateSubmitReminded ? strtotime($dateSubmitReminded) : strtotime($dateDue); + $checkDate = $time + (60 * 60 * 24 * $submitReminderDays); + if (time() > $checkDate) { + $mailable = new ReviewRemindAuto($context, $submission, $reviewAssignment); + } } } - if ($inviteReminderDays >= 1 && $reviewAssignment->getDateConfirmed() == null) { - $checkDate = strtotime($reviewAssignment->getDateResponseDue()); - if (time() - $checkDate > 60 * 60 * 24 * $inviteReminderDays) { - $mailable = new ReviewResponseRemindAuto($context, $submission, $reviewAssignment); + + $countInviteReminder = $reviewAssignment->getCountInviteReminder(); + if ($countInviteReminder == 0 || !$occurrencesInviteReminder || $countInviteReminder < $occurrencesInviteReminder) { + $dateConfirmed = $reviewAssignment->getDateConfirmed(); + if ($inviteReminderDays >= 1 && !$dateConfirmed) { + $dateResponseDue = $reviewAssignment->getDateResponseDue(); + $dateInviteReminded = $reviewAssignment->getDateInviteReminded(); + $time = $dateInviteReminded ? strtotime($dateInviteReminded) : strtotime($dateResponseDue); + $checkDate = $time + (60 * 60 * 24 * $inviteReminderDays); + if (time() > $checkDate) { + $mailable = new ReviewResponseRemindAuto($context, $submission, $reviewAssignment); + } } } diff --git a/controllers/grid/users/reviewer/form/ReviewReminderForm.php b/controllers/grid/users/reviewer/form/ReviewReminderForm.php index 8ed411b6b55..df5a5f6c10d 100644 --- a/controllers/grid/users/reviewer/form/ReviewReminderForm.php +++ b/controllers/grid/users/reviewer/form/ReviewReminderForm.php @@ -168,7 +168,7 @@ public function execute(...$functionArgs) Repo::eventLog()->add($eventLog); Repo::reviewAssignment()->edit($reviewAssignment, [ - 'dateReminded' => Core::getCurrentDate(), + 'dateSubmitReminded' => Core::getCurrentDate(), ]); } catch (TransportException $e) { $notificationMgr = new NotificationManager(); diff --git a/controllers/grid/users/reviewer/form/ReviewerForm.php b/controllers/grid/users/reviewer/form/ReviewerForm.php index 28179853488..9a1c6f192d4 100644 --- a/controllers/grid/users/reviewer/form/ReviewerForm.php +++ b/controllers/grid/users/reviewer/form/ReviewerForm.php @@ -464,6 +464,7 @@ protected function getMailable(): ReviewRequest $mailable->addData([ 'messageToReviewer' => __('reviewer.step1.requestBoilerplate'), 'abstractTermIfEnabled' => ($submission->getLocalizedAbstract() == '' ? '' : __('common.abstract')), // Deprecated; for OJS 2.x templates + 'occurrence' => 0, ]); // Remove template variables that haven't been set yet during form initialization diff --git a/locale/ar/common.po b/locale/ar/common.po index 3075ef66364..fc0603068cf 100644 --- a/locale/ar/common.po +++ b/locale/ar/common.po @@ -744,10 +744,10 @@ msgstr "تحديث" msgid "common.related" msgstr "ذو صلة" -msgid "common.reminder" +msgid "common.submit.reminder" msgstr "تذكير" -msgid "common.reminded.date" +msgid "common.submit.reminded.date" msgstr "مذكَّر بتاريخ: {$dateReminded}" msgid "common.remote" diff --git a/locale/az/common.po b/locale/az/common.po index 622b4ddcc4f..2cf4ead456f 100644 --- a/locale/az/common.po +++ b/locale/az/common.po @@ -1047,10 +1047,10 @@ msgstr "Yenilə" msgid "common.related" msgstr "Əlaqəli" -msgid "common.reminder" +msgid "common.submit.reminder" msgstr "Xatırlatma" -msgid "common.reminded.date" +msgid "common.submit.reminded.date" msgstr "Xatırladıldı: {$dateReminded}" msgid "common.remote" diff --git a/locale/bg/common.po b/locale/bg/common.po index e1e5f94ef17..fce6074e57e 100644 --- a/locale/bg/common.po +++ b/locale/bg/common.po @@ -742,10 +742,10 @@ msgstr "Обновяване" msgid "common.related" msgstr "Свързани" -msgid "common.reminder" +msgid "common.submit.reminder" msgstr "Напомняне" -msgid "common.reminded.date" +msgid "common.submit.reminded.date" msgstr "Напомняне на дата: {$dateReminded}" msgid "common.remote" diff --git a/locale/bs/common.po b/locale/bs/common.po index 8d01c9d5697..6b38660f1e1 100644 --- a/locale/bs/common.po +++ b/locale/bs/common.po @@ -711,10 +711,10 @@ msgstr "" msgid "common.related" msgstr "Povezano" -msgid "common.reminder" +msgid "common.submit.reminder" msgstr "" -msgid "common.reminded.date" +msgid "common.submit.reminded.date" msgstr "" msgid "common.remote" diff --git a/locale/ca/common.po b/locale/ca/common.po index f4098aa21d6..bfe4b0a64e7 100644 --- a/locale/ca/common.po +++ b/locale/ca/common.po @@ -743,10 +743,10 @@ msgstr "Actualitza" msgid "common.related" msgstr "Relacionat" -msgid "common.reminder" +msgid "common.submit.reminder" msgstr "Recordatori" -msgid "common.reminded.date" +msgid "common.submit.reminded.date" msgstr "Recordatori: {$dateReminded}" msgid "common.remote" diff --git a/locale/ckb/common.po b/locale/ckb/common.po index 907cad3a52c..d60eef2253d 100644 --- a/locale/ckb/common.po +++ b/locale/ckb/common.po @@ -706,10 +706,10 @@ msgstr "" msgid "common.related" msgstr "" -msgid "common.reminder" +msgid "common.submit.reminder" msgstr "" -msgid "common.reminded.date" +msgid "common.submit.reminded.date" msgstr "" msgid "common.remote" diff --git a/locale/cs/common.po b/locale/cs/common.po index 523c9809534..50b68358d04 100644 --- a/locale/cs/common.po +++ b/locale/cs/common.po @@ -747,10 +747,10 @@ msgstr "Obnovit" msgid "common.related" msgstr "Související" -msgid "common.reminder" +msgid "common.submit.reminder" msgstr "Připomenutí" -msgid "common.reminded.date" +msgid "common.submit.reminded.date" msgstr "Připomenuto: {$dateReminded}" msgid "common.remote" diff --git a/locale/da/common.po b/locale/da/common.po index 23655990c49..43e0d39c5c6 100644 --- a/locale/da/common.po +++ b/locale/da/common.po @@ -746,10 +746,10 @@ msgstr "Opdatér" msgid "common.related" msgstr "Relateret" -msgid "common.reminder" +msgid "common.submit.reminder" msgstr "Påmindelse" -msgid "common.reminded.date" +msgid "common.submit.reminded.date" msgstr "Påmindet: {$dateReminded}" msgid "common.remote" diff --git a/locale/de/common.po b/locale/de/common.po index 8e189b92c84..78409671738 100644 --- a/locale/de/common.po +++ b/locale/de/common.po @@ -747,10 +747,10 @@ msgstr "Aktualisieren" msgid "common.related" msgstr "Verbunden" -msgid "common.reminder" +msgid "common.submit.reminder" msgstr "Erinnerung" -msgid "common.reminded.date" +msgid "common.submit.reminded.date" msgstr "Erinnert: {$dateReminded}" msgid "common.remote" diff --git a/locale/el/common.po b/locale/el/common.po index 9e35f01d0f4..0a39b646f36 100644 --- a/locale/el/common.po +++ b/locale/el/common.po @@ -753,10 +753,10 @@ msgstr "Ανανέωση" msgid "common.related" msgstr "Σχετικό" -msgid "common.reminder" +msgid "common.submit.reminder" msgstr "Υπενθύμιση" -msgid "common.reminded.date" +msgid "common.submit.reminded.date" msgstr "Έγινε υπενθύμιση στις: {$dateReminded}" msgid "common.remote" diff --git a/locale/en/common.po b/locale/en/common.po index e58901fc57b..155bb3d5aa7 100644 --- a/locale/en/common.po +++ b/locale/en/common.po @@ -751,11 +751,17 @@ msgstr "Refresh" msgid "common.related" msgstr "Related" -msgid "common.reminder" -msgstr "Reminder" +msgid "common.submit.reminder" +msgstr "Review Reminder" -msgid "common.reminded.date" -msgstr "Reminded: {$dateReminded}" +msgid "common.invite.reminder" +msgstr "Invite Reminder" + +msgid "common.invite.reminded.date" +msgstr "Invite Reminded: {$dateReminded}" + +msgid "common.submit.reminded.date" +msgstr "Submit Reminded: {$dateReminded}" msgid "common.remote" msgstr "Remote" diff --git a/locale/es/common.po b/locale/es/common.po index 3ca481b426c..07c8ddcca89 100644 --- a/locale/es/common.po +++ b/locale/es/common.po @@ -748,10 +748,10 @@ msgstr "Recargar" msgid "common.related" msgstr "Relacionado" -msgid "common.reminder" +msgid "common.submit.reminder" msgstr "Recordatorio" -msgid "common.reminded.date" +msgid "common.submit.reminded.date" msgstr "Recordado: {$dateReminded}" msgid "common.remote" diff --git a/locale/eu/common.po b/locale/eu/common.po index 9318c6a315b..f156cdc5319 100644 --- a/locale/eu/common.po +++ b/locale/eu/common.po @@ -727,10 +727,10 @@ msgstr "Freskatu" msgid "common.related" msgstr "Erlazionatua" -msgid "common.reminder" +msgid "common.submit.reminder" msgstr "Gogorarazlea" -msgid "common.reminded.date" +msgid "common.submit.reminded.date" msgstr "" msgid "common.remote" diff --git a/locale/fa/common.po b/locale/fa/common.po index d193ff3e905..0726a3e4941 100644 --- a/locale/fa/common.po +++ b/locale/fa/common.po @@ -728,10 +728,10 @@ msgstr "بارگذاری مجدد صفحه" msgid "common.related" msgstr "موارد مربوطه" -msgid "common.reminder" +msgid "common.submit.reminder" msgstr "یادآوری" -msgid "common.reminded.date" +msgid "common.submit.reminded.date" msgstr "یادآوری شده در تاریخ: {$dateReminded}" msgid "common.remote" diff --git a/locale/fi/common.po b/locale/fi/common.po index edd7cc60f44..bbfa34b5a3d 100644 --- a/locale/fi/common.po +++ b/locale/fi/common.po @@ -743,10 +743,10 @@ msgstr "Päivitä" msgid "common.related" msgstr "Liittyvä" -msgid "common.reminder" +msgid "common.submit.reminder" msgstr "Muistutus" -msgid "common.reminded.date" +msgid "common.submit.reminded.date" msgstr "Muistutettu: {$dateReminded}" msgid "common.remote" diff --git a/locale/fr_CA/common.po b/locale/fr_CA/common.po index 2505d3da52c..b06f58d8d04 100644 --- a/locale/fr_CA/common.po +++ b/locale/fr_CA/common.po @@ -757,11 +757,17 @@ msgstr "Rafraîchir" msgid "common.related" msgstr "Connexe" -msgid "common.reminder" -msgstr "Rappel" +msgid "common.submit.reminder" +msgstr "Rappel de l'évaluation" -msgid "common.reminded.date" -msgstr "Rappel fait le : {$dateReminded}" +msgid "common.invite.reminder" +msgstr "Rappel de l'invitation" + +msgid "common.invite.reminded.date" +msgstr "Rappel de l'invitation fait le : {$dateReminded}" + +msgid "common.submit.reminded.date" +msgstr "Rappel de l'évaluation fait le : {$dateReminded}" msgid "common.remote" msgstr "À distance" diff --git a/locale/fr_FR/common.po b/locale/fr_FR/common.po index 6e554b60f2d..474e3787ff9 100644 --- a/locale/fr_FR/common.po +++ b/locale/fr_FR/common.po @@ -752,10 +752,10 @@ msgstr "Rafraîchir" msgid "common.related" msgstr "Connexe" -msgid "common.reminder" +msgid "common.submit.reminder" msgstr "Rappel" -msgid "common.reminded.date" +msgid "common.submit.reminded.date" msgstr "Rappelé : {$dateReminded}" msgid "common.remote" diff --git a/locale/gd/common.po b/locale/gd/common.po index d8fc2260cc0..ce3ab9a9b11 100644 --- a/locale/gd/common.po +++ b/locale/gd/common.po @@ -715,10 +715,10 @@ msgstr "Ath-nuadhaich" msgid "common.related" msgstr "Co-cheangailte" -msgid "common.reminder" +msgid "common.submit.reminder" msgstr "Cuimhneachan" -msgid "common.reminded.date" +msgid "common.submit.reminded.date" msgstr "Cuimhneachan: {$dateReminded}" msgid "common.remote" diff --git a/locale/gl/common.po b/locale/gl/common.po index 13c3cd3dead..4afc45fa094 100644 --- a/locale/gl/common.po +++ b/locale/gl/common.po @@ -736,10 +736,10 @@ msgstr "Recargar" msgid "common.related" msgstr "Relacionado" -msgid "common.reminder" +msgid "common.submit.reminder" msgstr "Recordatorio" -msgid "common.reminded.date" +msgid "common.submit.reminded.date" msgstr "Lembrado: {$dateReminded}" msgid "common.remote" diff --git a/locale/hr/common.po b/locale/hr/common.po index 7bc3ed312c2..6ab7dbdd3c2 100644 --- a/locale/hr/common.po +++ b/locale/hr/common.po @@ -745,10 +745,10 @@ msgstr "Ažurirati" msgid "common.related" msgstr "Povezano" -msgid "common.reminder" +msgid "common.submit.reminder" msgstr "Podsjetnik" -msgid "common.reminded.date" +msgid "common.submit.reminded.date" msgstr "Podsjetnik: {$dateReminded}" msgid "common.remote" diff --git a/locale/hu/common.po b/locale/hu/common.po index 2025c8b5b39..c10a022ecaf 100644 --- a/locale/hu/common.po +++ b/locale/hu/common.po @@ -747,10 +747,10 @@ msgstr "Frissítés" msgid "common.related" msgstr "Összefüggő" -msgid "common.reminder" +msgid "common.submit.reminder" msgstr "Emlékeztető" -msgid "common.reminded.date" +msgid "common.submit.reminded.date" msgstr "Emlékeztető: {$dateReminded}" msgid "common.remote" diff --git a/locale/hy/common.po b/locale/hy/common.po index 5df678cf0c4..adfb49d3168 100644 --- a/locale/hy/common.po +++ b/locale/hy/common.po @@ -745,10 +745,10 @@ msgstr "Թարմացնել" msgid "common.related" msgstr "Կապ ունեցող" -msgid "common.reminder" +msgid "common.submit.reminder" msgstr "Հիշեցնող" -msgid "common.reminded.date" +msgid "common.submit.reminded.date" msgstr "Հիշեցում: {$dateReminded}" msgid "common.remote" diff --git a/locale/id/common.po b/locale/id/common.po index 2ba9f6e6422..97a8bcc5734 100644 --- a/locale/id/common.po +++ b/locale/id/common.po @@ -742,10 +742,10 @@ msgstr "Segarkan" msgid "common.related" msgstr "Terkait" -msgid "common.reminder" +msgid "common.submit.reminder" msgstr "Pengingat" -msgid "common.reminded.date" +msgid "common.submit.reminded.date" msgstr "Diingatkan: {$dateReminded}" msgid "common.remote" diff --git a/locale/is/common.po b/locale/is/common.po index 619a978ae98..f4390e7606b 100644 --- a/locale/is/common.po +++ b/locale/is/common.po @@ -741,10 +741,10 @@ msgstr "Endurnýja" msgid "common.related" msgstr "Tengt" -msgid "common.reminder" +msgid "common.submit.reminder" msgstr "Áminning" -msgid "common.reminded.date" +msgid "common.submit.reminded.date" msgstr "Minnt á: {$dateReminded}" msgid "common.remote" diff --git a/locale/it/common.po b/locale/it/common.po index 18f6df082de..18521a010bc 100644 --- a/locale/it/common.po +++ b/locale/it/common.po @@ -747,10 +747,10 @@ msgstr "Aggiorna" msgid "common.related" msgstr "Collegato" -msgid "common.reminder" +msgid "common.submit.reminder" msgstr "Promemoria" -msgid "common.reminded.date" +msgid "common.submit.reminded.date" msgstr "Data invio promemoria: {$dateReminded}" msgid "common.remote" diff --git a/locale/ja/common.po b/locale/ja/common.po index 8a76040b67a..acd0305aafd 100644 --- a/locale/ja/common.po +++ b/locale/ja/common.po @@ -738,10 +738,10 @@ msgstr "再読込" msgid "common.related" msgstr "関連" -msgid "common.reminder" +msgid "common.submit.reminder" msgstr "リマインド" -msgid "common.reminded.date" +msgid "common.submit.reminded.date" msgstr "リマインド日: {$dateReminded}" msgid "common.remote" diff --git a/locale/ka/common.po b/locale/ka/common.po index 50e8b513ffa..e0c59d1aaa2 100644 --- a/locale/ka/common.po +++ b/locale/ka/common.po @@ -742,10 +742,10 @@ msgstr "განახლება" msgid "common.related" msgstr "მსგავსი" -msgid "common.reminder" +msgid "common.submit.reminder" msgstr "შემხსენებელი" -msgid "common.reminded.date" +msgid "common.submit.reminded.date" msgstr "შეხსენებული: {$dateReminded}" msgid "common.remote" diff --git a/locale/kk/common.po b/locale/kk/common.po index b6beada36b3..b349e303a52 100644 --- a/locale/kk/common.po +++ b/locale/kk/common.po @@ -741,10 +741,10 @@ msgstr "Жаңарту" msgid "common.related" msgstr "Байланысты" -msgid "common.reminder" +msgid "common.submit.reminder" msgstr "Еске салу" -msgid "common.reminded.date" +msgid "common.submit.reminded.date" msgstr "Ескертілді: {$dateReminded}" msgid "common.remote" diff --git a/locale/lv/common.po b/locale/lv/common.po index 659b026d8ca..1b3d9a0f352 100644 --- a/locale/lv/common.po +++ b/locale/lv/common.po @@ -610,10 +610,10 @@ msgstr "Atsvaidzināt" msgid "common.related" msgstr "Saistītais" -msgid "common.reminder" +msgid "common.submit.reminder" msgstr "Atgādinājums" -msgid "common.reminded.date" +msgid "common.submit.reminded.date" msgstr "Atgādināts: {$dateReminded}" msgid "common.remote" diff --git a/locale/mk/common.po b/locale/mk/common.po index 522ccea21fd..83961d841f6 100644 --- a/locale/mk/common.po +++ b/locale/mk/common.po @@ -746,10 +746,10 @@ msgstr "Освежи" msgid "common.related" msgstr "Поверано" -msgid "common.reminder" +msgid "common.submit.reminder" msgstr "Потсетник" -msgid "common.reminded.date" +msgid "common.submit.reminded.date" msgstr "Подсетен: {$dateReminded}" msgid "common.remote" diff --git a/locale/ms/common.po b/locale/ms/common.po index 85f250956bf..75d761b49f1 100644 --- a/locale/ms/common.po +++ b/locale/ms/common.po @@ -741,10 +741,10 @@ msgstr "Segarkan semula" msgid "common.related" msgstr "Berkaitan" -msgid "common.reminder" +msgid "common.submit.reminder" msgstr "Peringatan" -msgid "common.reminded.date" +msgid "common.submit.reminded.date" msgstr "Diingatkan: {$dateReminded}" msgid "common.remote" diff --git a/locale/nb/common.po b/locale/nb/common.po index 30432e94214..c80787afe1e 100644 --- a/locale/nb/common.po +++ b/locale/nb/common.po @@ -742,10 +742,10 @@ msgstr "Oppdater" msgid "common.related" msgstr "Relaterte" -msgid "common.reminder" +msgid "common.submit.reminder" msgstr "Påminnelse" -msgid "common.reminded.date" +msgid "common.submit.reminded.date" msgstr "Påminnet: {$dateReminded}" msgid "common.remote" diff --git a/locale/nl/common.po b/locale/nl/common.po index df1e605d877..6e1a8246079 100644 --- a/locale/nl/common.po +++ b/locale/nl/common.po @@ -745,10 +745,10 @@ msgstr "Verversen" msgid "common.related" msgstr "Verwant" -msgid "common.reminder" +msgid "common.submit.reminder" msgstr "Herinnering" -msgid "common.reminded.date" +msgid "common.submit.reminded.date" msgstr "Datum van herinnering: {$dateReminded}" msgid "common.remote" diff --git a/locale/pl/common.po b/locale/pl/common.po index 8780993d05b..fb473cb352d 100644 --- a/locale/pl/common.po +++ b/locale/pl/common.po @@ -742,10 +742,10 @@ msgstr "Odśwież" msgid "common.related" msgstr "Powiązane" -msgid "common.reminder" +msgid "common.submit.reminder" msgstr "Przypomnienie" -msgid "common.reminded.date" +msgid "common.submit.reminded.date" msgstr "Powiadomiony: {$dateReminded}" msgid "common.remote" diff --git a/locale/pt_BR/common.po b/locale/pt_BR/common.po index 22011d577ee..cddc93cb1e9 100644 --- a/locale/pt_BR/common.po +++ b/locale/pt_BR/common.po @@ -745,10 +745,10 @@ msgstr "Atualizar" msgid "common.related" msgstr "Relacionado" -msgid "common.reminder" +msgid "common.submit.reminder" msgstr "Lembrete" -msgid "common.reminded.date" +msgid "common.submit.reminded.date" msgstr "Lembrado: {$dateReminded}" msgid "common.remote" diff --git a/locale/pt_PT/common.po b/locale/pt_PT/common.po index c2dac9543b9..747d8044fe7 100644 --- a/locale/pt_PT/common.po +++ b/locale/pt_PT/common.po @@ -745,10 +745,10 @@ msgstr "Atualizar" msgid "common.related" msgstr "Relacionado" -msgid "common.reminder" +msgid "common.submit.reminder" msgstr "Lembrete" -msgid "common.reminded.date" +msgid "common.submit.reminded.date" msgstr "Data lembrete: {$dateReminded}" msgid "common.remote" diff --git a/locale/ro/common.po b/locale/ro/common.po index e33732b6733..2d5888ff11c 100644 --- a/locale/ro/common.po +++ b/locale/ro/common.po @@ -743,10 +743,10 @@ msgstr "Reîmprospătare" msgid "common.related" msgstr "Legat de" -msgid "common.reminder" +msgid "common.submit.reminder" msgstr "Reamintire" -msgid "common.reminded.date" +msgid "common.submit.reminded.date" msgstr "Reamintire: {$dateReminded}" msgid "common.remote" diff --git a/locale/ru/common.po b/locale/ru/common.po index 7b464298794..c5555989abd 100644 --- a/locale/ru/common.po +++ b/locale/ru/common.po @@ -745,10 +745,10 @@ msgstr "Обновить" msgid "common.related" msgstr "Связанные" -msgid "common.reminder" +msgid "common.submit.reminder" msgstr "Напоминание" -msgid "common.reminded.date" +msgid "common.submit.reminded.date" msgstr "Отправлено напоминание: {$dateReminded}" msgid "common.remote" diff --git a/locale/sl/common.po b/locale/sl/common.po index df072f535df..5808d4fa6d5 100644 --- a/locale/sl/common.po +++ b/locale/sl/common.po @@ -743,10 +743,10 @@ msgstr "Osveži" msgid "common.related" msgstr "Soroden" -msgid "common.reminder" +msgid "common.submit.reminder" msgstr "Opomnik" -msgid "common.reminded.date" +msgid "common.submit.reminded.date" msgstr "Opomnik: {$dateReminded}" msgid "common.remote" diff --git a/locale/sr@cyrillic/common.po b/locale/sr@cyrillic/common.po index 9c744c8557f..c93ad6b592f 100644 --- a/locale/sr@cyrillic/common.po +++ b/locale/sr@cyrillic/common.po @@ -732,10 +732,10 @@ msgstr "Освежи" msgid "common.related" msgstr "Повезано" -msgid "common.reminder" +msgid "common.submit.reminder" msgstr "Подсетник" -msgid "common.reminded.date" +msgid "common.submit.reminded.date" msgstr "Подсећен: {$dateReminded}" msgid "common.remote" diff --git a/locale/sr@latin/common.po b/locale/sr@latin/common.po index 6b0fb67a0b4..052484accb9 100644 --- a/locale/sr@latin/common.po +++ b/locale/sr@latin/common.po @@ -731,10 +731,10 @@ msgstr "Osveži" msgid "common.related" msgstr "Povezano" -msgid "common.reminder" +msgid "common.submit.reminder" msgstr "Podsetnik" -msgid "common.reminded.date" +msgid "common.submit.reminded.date" msgstr "Podsećen: {$dateReminded}" msgid "common.remote" diff --git a/locale/sv/common.po b/locale/sv/common.po index b3e1291f36f..65d18ae6c00 100644 --- a/locale/sv/common.po +++ b/locale/sv/common.po @@ -744,10 +744,10 @@ msgstr "Uppdatera" msgid "common.related" msgstr "Relaterad" -msgid "common.reminder" +msgid "common.submit.reminder" msgstr "Påminnelse" -msgid "common.reminded.date" +msgid "common.submit.reminded.date" msgstr "Påmind: {$dateReminded}" msgid "common.remote" diff --git a/locale/tr/common.po b/locale/tr/common.po index bc73bd9ba50..f4f5b63136a 100644 --- a/locale/tr/common.po +++ b/locale/tr/common.po @@ -740,10 +740,10 @@ msgstr "Yenile" msgid "common.related" msgstr "İlgili" -msgid "common.reminder" +msgid "common.submit.reminder" msgstr "Hatırlatma" -msgid "common.reminded.date" +msgid "common.submit.reminded.date" msgstr "Hatırlatıldı: {$dateReminded}" msgid "common.remote" diff --git a/locale/uk/common.po b/locale/uk/common.po index d25f2b565cc..5cae6b1c336 100644 --- a/locale/uk/common.po +++ b/locale/uk/common.po @@ -744,10 +744,10 @@ msgstr "Оновити" msgid "common.related" msgstr "Пов'язані" -msgid "common.reminder" +msgid "common.submit.reminder" msgstr "Нагадування" -msgid "common.reminded.date" +msgid "common.submit.reminded.date" msgstr "Нагадування: {$dateReminded}" msgid "common.remote" diff --git a/locale/vi/common.po b/locale/vi/common.po index faecbf1db4e..492a6a3cd37 100644 --- a/locale/vi/common.po +++ b/locale/vi/common.po @@ -742,10 +742,10 @@ msgstr "Làm tươi" msgid "common.related" msgstr "Liên quan với" -msgid "common.reminder" +msgid "common.submit.reminder" msgstr "Nhắc nhở" -msgid "common.reminded.date" +msgid "common.submit.reminded.date" msgstr "Ngày nhắc nhở: {$dateReminded}" msgid "common.remote" diff --git a/locale/zh_CN/common.po b/locale/zh_CN/common.po index ff1e4699a4e..a98b1adc9f1 100644 --- a/locale/zh_CN/common.po +++ b/locale/zh_CN/common.po @@ -734,10 +734,10 @@ msgstr "刷新" msgid "common.related" msgstr "相关" -msgid "common.reminder" +msgid "common.submit.reminder" msgstr "提醒" -msgid "common.reminded.date" +msgid "common.submit.reminded.date" msgstr "已提醒:{$dateReminded}" msgid "common.remote" diff --git a/locale/zh_Hant/common.po b/locale/zh_Hant/common.po index cb4fd0d3a41..07f9f7088ef 100644 --- a/locale/zh_Hant/common.po +++ b/locale/zh_Hant/common.po @@ -704,10 +704,10 @@ msgstr "" msgid "common.related" msgstr "" -msgid "common.reminder" +msgid "common.submit.reminder" msgstr "" -msgid "common.reminded.date" +msgid "common.submit.reminded.date" msgstr "" msgid "common.remote" diff --git a/schemas/context.json b/schemas/context.json index 979283a531f..21c48e7b89b 100644 --- a/schemas/context.json +++ b/schemas/context.json @@ -512,6 +512,14 @@ "min:0" ] }, + "numOccurrencesForInviteReminder": { + "type": "integer", + "default": 1, + "validation": [ + "nullable", + "min:1" + ] + }, "numDaysBeforeSubmitReminder": { "type": "integer", "validation": [ @@ -519,6 +527,14 @@ "min:0" ] }, + "numOccurrencesForSubmitReminder": { + "type": "integer", + "default": 1, + "validation": [ + "nullable", + "min:1" + ] + }, "numPageLinks": { "type": "integer", "default": 10, diff --git a/schemas/reviewAssignment.json b/schemas/reviewAssignment.json index 607d44b00bf..6659aefd039 100644 --- a/schemas/reviewAssignment.json +++ b/schemas/reviewAssignment.json @@ -106,15 +106,36 @@ ], "apiSummary": true }, - "dateReminded": { + "dateInviteReminded": { "type": "string", - "description": "Date the reviewer was reminded about the assignment", + "description": "Date the reviewer was reminded about the response", "validation": [ "date:Y-m-d H:i:s", "nullable" ], "apiSummary": true }, + "countInviteReminder": { + "type": "integer", + "default": 0, + "description": "Number of times the reviewer was reminded for the response", + "apiSummary": true + }, + "dateSubmitReminded": { + "type": "string", + "description": "Date the reviewer was reminded about the review", + "validation": [ + "date:Y-m-d H:i:s", + "nullable" + ], + "apiSummary": true + }, + "countSubmitReminder": { + "type": "integer", + "default": 0, + "description": "Number of times the reviewer was reminded for the review", + "apiSummary": true + }, "dateResponseDue": { "type": "string", "description": "Date until which the response from reviewer is expected", diff --git a/templates/controllers/grid/users/reviewer/readReview.tpl b/templates/controllers/grid/users/reviewer/readReview.tpl index 5a19a8e0ac5..c0342be53b8 100644 --- a/templates/controllers/grid/users/reviewer/readReview.tpl +++ b/templates/controllers/grid/users/reviewer/readReview.tpl @@ -66,8 +66,10 @@ {translate key="common.completed.date" dateCompleted=$reviewAssignment->getDateCompleted()|date_format:$datetimeFormatShort} {elseif $reviewAssignment->getDateConfirmed()} {translate key="common.confirmed.date" dateConfirmed=$reviewAssignment->getDateConfirmed()|date_format:$datetimeFormatShort} - {elseif $reviewAssignment->getDateReminded()} - {translate key="common.reminded.date" dateReminded=$reviewAssignment->getDateReminded()|date_format:$datetimeFormatShort} + {elseif $reviewAssignment->getDateInviteReminded()} + {translate key="common.invite.reminded.date" dateReminded=$reviewAssignment->getDateInviteReminded()|date_format:$datetimeFormatShort} + {elseif $reviewAssignment->getDateSubmitReminded()} + {translate key="common.submit.reminded.date" dateReminded=$reviewAssignment->getDateSubmitReminded()|date_format:$datetimeFormatShort} {elseif $reviewAssignment->getDateNotified()} {translate key="common.notified.date" dateNotified=$reviewAssignment->getDateNotified()|date_format:$datetimeFormatShort} {elseif $reviewAssignment->getDateAssigned()} diff --git a/xml/schema/reviews.xml b/xml/schema/reviews.xml index 40707c1ae7a..3381956fd3b 100644 --- a/xml/schema/reviews.xml +++ b/xml/schema/reviews.xml @@ -53,7 +53,7 @@ - +