pkp-lib icon indicating copy to clipboard operation
pkp-lib copied to clipboard

pkp/pkp-lib#5885 Review remainder update

Open touhidurabir opened this issue 1 year ago • 6 comments

for pkp/pkp-lib#5885

touhidurabir avatar Jan 11 '24 13:01 touhidurabir

@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...

Vitaliy-1 avatar Jan 20 '24 15:01 Vitaliy-1

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

  1. set reminder day before and after the review request response due date if invited reviewer has not yet responded to the review invitation request.
  2. set reminder day before and after the review 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

  1. sent only one review request response due reminder before the response due date if has not yet responded to the request and only if that day value is set .
  2. sent only one review request response due reminder after the response due date if has not yet responded to the request and only if that day value is set .
  3. sent only one review submission due reminder before the review submission due date if reviewer has not yet submitted the review and only if that day value is set .
  4. sent only one review submission due reminder after 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 .

touhidurabir avatar Jan 30 '24 13:01 touhidurabir

Hey @touhidurabir -- please hold off on this one until @Devika008 has had a chance to review things.

asmecher avatar Jan 30 '24 16:01 asmecher

@asmecher take a look at the PR again .

touhidurabir avatar Mar 14 '24 09:03 touhidurabir

@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 .

touhidurabir avatar Apr 25 '24 11:04 touhidurabir

@asmecher rebased and all tests are passing . please take a final look .

touhidurabir avatar Jun 14 '24 09:06 touhidurabir