pkp-lib
pkp-lib copied to clipboard
pkp/pkp-lib#5885 Review remainder update
for pkp/pkp-lib#5885
@touhidurabir, thinking about this further, one way to achieve this is adding a context setting that depicts a number of email reminders to show. Something like:
$this->addField(new FieldText('numReviewRequestResponseReminders', [
'label' => __('manager.setup.reviewOptions.numReviewRequestResponseReminders'),
'description' => __('manager.setup.reviewOptions.numReviewRequestResponseReminders.description'),
'value' => $context->getData('numReviewRequestResponseReminders'),
'size' => 'small',
]));
And a setting to hold values for all custom fields. Each reminder option should accept negative numbers if implementing this way
foreach ($context->getData('reviewRequestResponseReminders') as $reviewRequestResponseReminder) {
$this->addField(new FieldText('requestResponseReminder', [
...
]));
}
This also requires Vue form modification to support new fields added/subtracted dynamically - by listening to the change
event, which is emitted when a field prop changes.
Another way could be adding a new form field component that dynamically supports custom number of inputs depending on a value of another field...
Hi @Vitaliy-1 , can you explain how the negative number works in bit more details , I am still bit confused how it will work . I have followed the following implementation approach
- set reminder day
before
andafter
thereview request response
due date if invited reviewer has not yet responded to the review invitation request. - set reminder day
before
andafter
thereview submission
due date if the reviewer has accepted the invitation but has not submitted the review yet .
The implementation that I have designed is so that it will only sent one such reminder for each case that is
- sent only one
review request response
due reminderbefore
the response due date if has not yet responded to the request and only if that day value is set . - sent only one
review request response
due reminderafter
the response due date if has not yet responded to the request and only if that day value is set . - sent only one
review submission
due reminderbefore
the review submission due date if reviewer has not yet submitted the review and only if that day value is set . - sent only one
review submission
due reminderafter
the review submission due date if reviewer has not yet submitted the review and only if that day value is set .
so for each above 4 cases, only one reminder for each case and no more than that .
Hey @touhidurabir -- please hold off on this one until @Devika008 has had a chance to review things.
@asmecher take a look at the PR again .
@asmecher can you take another look specifically at the commit test added for queue job . I have added some tests and at the same time I had to update in the core PKPTestCase
.
@asmecher rebased and all tests are passing . please take a final look .