Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3427 automated reminder help text has been update to make the function of the Review (Accepted) review type clearer #3538

Merged
merged 4 commits into from
May 19, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions docs/source/manager/other/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ Janeway lets you define your own email reminders for overdue Reviews and Revisio
- The name of the template that should be used when sending the reminder. If this template does no exist you will be asked to create it.
- Subject
- The email subject to send with the reminder.

There are three types of reminder email supported by Janeway:

- Review (Invited) - sent when a reviewer has been invited but not accepted a review request.
- Review (Accepted) - sent when a reviewer has accepted a review request but not yet completed it.
- Revision - Sent to authors with active revision requests.

Review reminders, both invited and accepted, are sent based on the review assignment due date set by the editor. Revision reminders are sent based on the revision request due date set by the editor. You can set reminders to be sent either before or after the set due date.

A reminder email has access to three objects in the template:

Expand Down
30 changes: 22 additions & 8 deletions src/cron/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,20 +100,34 @@ class Reminder(models.Model):
)
type = models.CharField(max_length=100, choices=REMINDER_CHOICES)
run_type = models.CharField(max_length=100, choices=RUN_TYPE_CHOICES)
days = models.PositiveIntegerField(help_text="The number of days before or after this reminder should fire")
template_name = models.CharField(max_length=100, help_text="The name of the email template, if it doesn't exist "
"you will be asked to create it. Should have no spaces.")
days = models.PositiveIntegerField(
help_text="The number of days before or "
"after this reminder should fire",
)
template_name = models.CharField(
max_length=100,
help_text="The name of the email template, if it doesn't exist "
"you will be asked to create it. Should have no spaces.",
)
subject = models.CharField(max_length=200)

def __str__(self):
return "{0}: {1}, {2}, {3}".format(self.journal.code, self.run_type, self.type, self.subject)
return "{0}: {1}, {2}, {3}".format(
self.journal.code,
self.run_type,
self.type,
self.subject,
)

def target_date(self):
"""
Works out the target date of a reminder by adding or subtracting a timedelta from today's date.
Examples: Reminder set to send 5 days before the due date we take today's date and add 5 days to search
for ReviewAssignments that are due 5 days from now. The reverse is true for after, we remove 5 days from
today's date to work out which ReviewAssignments were due 5 days ago.
Works out the target date of a reminder by adding or subtracting a
timedelta from today's date.
Examples: Reminder set to send 5 days before the due date we take
today's date and add 5 days to search for ReviewAssignments that are
due 5 days from now. The reverse is true for after, we remove 5 days
from today's date to work out which ReviewAssignments were due 5 days
ago.
"""
date_time = None

Expand Down
9 changes: 1 addition & 8 deletions src/templates/admin/cron/manage_reminder.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,7 @@
<h2>Manage Reminders</h2>
</div>
<div class="content">
<p>There are three types of reminder email supported by Janeway:</p>
<ul>
<li>Review (Invited) - sent when a reviewer has been invited but not responded.</li>
<li>Review (Accepted) - sent when a reviewer has accepted a review request.</li>
<li>Revision - Sent for revision requests.</li>
</ul>
<p>In addition you can also set reminders to be before or after the due date. It is recommended that you
not create too many reminders for peer reviewers.</p>
{% include "elements/cron/reminders_help.html" %}

<p>Janeway has built in review reminder templates you can use.</p>
<ul>
Expand Down
12 changes: 2 additions & 10 deletions src/templates/admin/cron/reminders.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,7 @@ <h2>Active Reminders</h2>
<a class=" button" href="{% url 'cron_create_reminder' %}"><i class="fa fa-plus">&nbsp;</i>Add Reminders</a>
</div>
<div class="content">
<p>Currently active Review and Revision reminders are listed below. You can edit, delete or create new reminders from this interface. There are three types of reminder email supported by Janeway:</p>
<ul>
<li>Review (Invited) - sent when a reviewer has been invited but not responded.</li>
<li>Review (Accepted) - sent when a reviewer has accepted a review request.</li>
<li>Revision - Sent for revision requests.</li>
</ul>
<p>In addition you can also set reminders to be before or after the due date. It is recommended that you not create too many reminders for peer reviewers.</p>

{% include "elements/cron/reminders_help.html" %}

<form method="POST" action="{% url 'cron_reminders' %}">
{% csrf_token %}
Expand All @@ -43,8 +36,7 @@ <h2>Active Reminders</h2>
{% for reminder in reminders %}
<tr>
<td>{{ reminder.pk }}</td>
<td>Sent {{ reminder.days }} days {{ reminder.run_type }} {{ reminder.get_type_display }} is
due.</td>
<td>Sent {{ reminder.days }} days {{ reminder.run_type }} {{ reminder.get_type_display }} is due.</td>
<td>{{ reminder.template_name }} <a href="{% url 'cron_create_template' reminder.pk reminder.template_name %}"><i class="fa fa-edit">&nbsp;</i></a></td>
<td>{{ reminder.subject }}</td>
<td>
Expand Down
15 changes: 15 additions & 0 deletions src/templates/admin/elements/cron/reminders_help.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<p>Currently active Review and Revision reminders are listed below. You can
edit, delete or create new reminders from this interface. There are three
types of reminder email supported by Janeway:</p>
<ul>
<li><strong>Review (Invited)</strong> - sent when a reviewer has been
invited but not accepted a review request.
</li>
<li><strong>Review (Accepted)</strong> - sent when a reviewer has accepted
a review request but not yet completed it.
</li>
<li><strong>Revision</strong> - Sent to authors with active revision requests.</li>
</ul>
<p>Review reminders, both invited and accepted, are sent based on the review assignment due date set by the editor. Revision reminders are sent based on the revision request due date set by the editor. You can set reminders to be sent either before or after the set due date.</p>
<p>It is recommended that you not create too many reminders for peer
reviewers.</p>