SciPost Code Repository

Skip to content
Snippets Groups Projects
Commit 534b65e3 authored by Jean-Sébastien Caux's avatar Jean-Sébastien Caux
Browse files

Update invitations nr_reminders upon auto-reminding

parent 94b7c780
No related branches found
No related tags found
No related merge requests found
......@@ -31,6 +31,9 @@ class Command(BaseCommand):
mail_code='referees/invite_unregistered_to_referee_reminder1',
instance=invitation)
mail_sender.send()
invitation.nr_reminders += 1
invitation.date_last_reminded = timezone.now()
invitation.save()
# second (and final) reminder after 4 days
if workdays_between(invitation.date_invited, timezone.now()) == 4:
if invitation.referee:
......@@ -43,12 +46,15 @@ class Command(BaseCommand):
mail_code='referees/invite_unregistered_to_referee_reminder2',
instance=invitation)
mail_sender.send()
invitation.nr_reminders += 1
invitation.date_last_reminded = timezone.now()
invitation.save()
# after 6 days of no response, EIC is automatically emailed
# with the suggestion of removing and replacing this referee
# TODO
# one week before refereeing deadline: auto email reminder to ref
if workdays_between (timezone.now(), submission.reporting_deadline) == 5:
if workdays_between(timezone.now(), submission.reporting_deadline) == 5:
for invitation in submission.refereeing_invitations.in_process():
mail_sender = DirectMailUtil(mail_code='referees/remind_referee_deadline_1week',
instance=invitation)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment