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

Editor review complete email now contains additional information and a direct link #4324

Merged
merged 3 commits into from
Jul 17, 2024
Merged
Show file tree
Hide file tree
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
36 changes: 36 additions & 0 deletions src/core/migrations/0096_update_review_ack_email.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Generated by Django 4.2 on 2024-07-17 09:52

from django.db import migrations
from utils import migration_utils

OLD_VALUE_ONE = 'Dear {{ review_assignment.editor.first_name }}, <br><br>This is a notification that the reviewer status on "{{ article.safe_title }}" in {{ article.journal.name }} has been updated. You can view more information on the journal site: {{ review_in_review_url }} <br><br>All best wishes, <br>{{ request.user.signature }}'
OLD_VALUE_TWO = 'Dear {{ review_assignment.editor.full_name }}, <br/><br/>This is a notification that the reviewer status on "{{ article.safe_title }}" in {{ article.journal.name }} has been updated. You can view more information on the journal site: {{ review_in_review_url }} <br/><br/>Regards,'
OLD_VALUE_THREE = 'Dear {{ review_assignment.editor.full_name }}, <br/><br/>This is a notification that the reviewer status on "{{ article.safe_title }}" in {{ article.journal.name }} has been updated. You can view more information on the journal site: {{ review_in_review_url }} <br/><br/>Regards, <br/>{{ request.user.signature }}'
OLD_VALUE_FOUR = 'Dear {{ review_assignment.editor.full_name }}, <br><br>This is a notification that the reviewer status on "{{ article.safe_title }}" in {{ article.journal.name }} has been updated. You can view more information on the journal website at: {{ review_in_review_url }} <br><br>Best wishes,<br> <br>{{ request.user.signature }}'
OLD_VALUE_FIVE = 'Dear {{ review_assignment.editor.full_name }}, <br><br>This is a notification that the reviewer status on "{{ article.safe_title }}" in {{ article.journal.name }} has been updated. You can view more information on the journal site: {{ review_in_review_url }} <br><br>Regards, <br>{{ request.user.signature }}'
OLD_VALUE_SIX = 'Dear {{ review_assignment.editor.full_name }}, <br><br>This is a notification that the reviewer status on "{{ article.safe_title }}" in {{ article.journal.name }} has been updated. You can view more information on the journal site: {{ review_in_review_url }} <br><br>Regards,'
NEW_VALUE = "<p>Dear {{ review_assignment.editor.full_name }},</p><p>{{ review_assignment.reviewer.full_name }} has completed their review of \"{{ review_assignment.article.title }}\"{% if review_assignment.decision %} with this recommendation: {{ review_assignment.get_decision_display }}{% endif %}.</p><p>You can view more information on the journal site: {% journal_url 'review_view_review' review_assignment.article.pk review_assignment.pk %}</p><p>Regards,</p>"


def replace_review_completed_ack(apps, schema_editor):
migration_utils.update_default_setting_values(
apps,
setting_name='review_complete_acknowledgement',
group_name='email',
values_to_replace=[OLD_VALUE_ONE, OLD_VALUE_TWO, OLD_VALUE_THREE, OLD_VALUE_FOUR, OLD_VALUE_FIVE, OLD_VALUE_SIX],
replacement_value=NEW_VALUE,
)


class Migration(migrations.Migration):

dependencies = [
('core', '0095_auto_20240605_1024'),
]

operations = [
migrations.RunPython(
replace_review_completed_ack,
reverse_code=migrations.RunPython.noop,
),
]
2 changes: 1 addition & 1 deletion src/utils/install/journal_defaults.json
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@
"type": "rich-text"
},
"value": {
"default": "Dear {{ review_assignment.editor.full_name }}, <br/><br/>This is a notification that the reviewer status on \"{{ article.safe_title }}\" in {{ article.journal.name }} has been updated. You can view more information on the journal site: {{ review_in_review_url }} <br/><br/>Regards,"
"default": "<p>Dear {{ review_assignment.editor.full_name }},</p><p>{{ review_assignment.reviewer.full_name }} has completed their review of \"{{ review_assignment.article.title }}\"{% if review_assignment.decision %} with this recommendation: {{ review_assignment.get_decision_display }}{% endif %}.</p><p>You can view more information on the journal site: {% journal_url 'review_view_review' review_assignment.article.pk review_assignment.pk %}</p><p>Regards,</p>"
},
"editable_by": [
"editor",
Expand Down