Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Send email to new mailtrigger controlled destinations when iana exper…
…t review state changes. Fixes #3121. Commit ready for merge. - Legacy-Id: 18714
- Loading branch information
Showing
6 changed files
with
97 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
ietf/mailtrigger/migrations/0019_email_iana_expert_review_state_changed.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Copyright The IETF Trust 2020 All Rights Reserved | ||
|
||
from django.db import migrations | ||
|
||
def forward(apps,schema_editor): | ||
MailTrigger = apps.get_model('mailtrigger', 'MailTrigger') | ||
Recipient = apps.get_model('mailtrigger', 'Recipient') | ||
|
||
iana_er_state_changed = MailTrigger.objects.create( | ||
slug='iana_expert_review_state_changed', | ||
desc='Recipients when the IANA expert review for a document changes', | ||
) | ||
|
||
iana_er_state_changed.to.set( | ||
Recipient.objects.filter(slug__in=[ | ||
'doc_ad', 'doc_authors', 'doc_group_chairs', 'doc_group_responsible_directors', 'doc_notify', 'doc_shepherd' | ||
]) | ||
) | ||
|
||
def reverse(apps,schema_editor): | ||
MailTrigger = apps.get_model('mailtrigger', 'MailTrigger') | ||
|
||
MailTrigger.objects.filter(slug='iana_expert_review_state_changed').delete() | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('mailtrigger', '0018_interim_approve_announce'), | ||
] | ||
|
||
operations = [ | ||
migrations.RunPython(forward, reverse), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{% autoescape off %}The IANA expert review state for {{event.doc.name}} has changed to {{event.state.name}}. | ||
|
||
For more information, see the document in the Datatracker at: {{ url }} | ||
{% endautoescape %} |