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

Adds logs to both emails sent when a review is completed. #4270

Merged
merged 2 commits into from
Jun 18, 2024
Merged
Changes from all 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
15 changes: 15 additions & 0 deletions src/utils/transactional_emails.py
ajrbyers marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -290,13 +290,27 @@ def send_review_complete_acknowledgements(**kwargs):
# send slack
notify_helpers.send_slack(request, description, ['slack_editors'])

reviewer_log_dict = {
'level': 'Info',
'action_text': f"Review complete notification sent to {review_assignment.reviewer.full_name}",
'types': 'Review Complete',
'target': article,
}
editor_log_dict = {
'level': 'Info',
'action_text': f"Review complete notification sent to {review_assignment.editor.full_name}",
'types': 'Review Complete',
'target': article,
}

# send to reviewer
notify_helpers.send_email_with_body_from_setting_template(
request,
'review_complete_reviewer_acknowledgement',
'subject_review_complete_reviewer_acknowledgement',
review_assignment.reviewer.email,
context,
log_dict=reviewer_log_dict,
)

# send to editor
Expand All @@ -309,6 +323,7 @@ def send_review_complete_acknowledgements(**kwargs):
'subject_review_complete_acknowledgement',
editor.email,
context,
log_dict=editor_log_dict,
)


Expand Down