Skip to content

Commit

Permalink
Send mail to a list when a new IETF WG -00 is submitted. Fixes #2730.…
Browse files Browse the repository at this point in the history
… Commit ready for merge.

 - Legacy-Id: 16287
  • Loading branch information
rjsparks committed Jun 18, 2019
1 parent 34d17c3 commit 9ace7db
Show file tree
Hide file tree
Showing 5 changed files with 11,067 additions and 13,405 deletions.
39 changes: 39 additions & 0 deletions ietf/mailtrigger/migrations/0006_sub_new_wg_00.py
@@ -0,0 +1,39 @@
# Copyright The IETF Trust 2019, All Rights Reserved
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import migrations

def forward(apps, schema_editor):
MailTrigger = apps.get_model('mailtrigger', 'MailTrigger')
Recipient = apps.get_model('mailtrigger', 'Recipient')

Recipient.objects.create(
slug = 'new_wg_doc_list',
desc = "The email list for announcing new WG -00 submissions",
template = '<new-wg-docs@ietf.org>'
)
changed = MailTrigger.objects.create(
slug = 'sub_new_wg_00',
desc = 'Recipients when a new IETF WG -00 draft is announced',
)
changed.to.set(Recipient.objects.filter(slug__in=['new_wg_doc_list']))


def reverse(apps, schema_editor):
MailTrigger = apps.get_model('mailtrigger','MailTrigger')
Recipient = apps.get_model('mailtrigger', 'Recipient')

MailTrigger.objects.filter(slug='sub_new_wg_00').delete()
Recipient.objects.filter(slug='new_wg_doc_list').delete()


class Migration(migrations.Migration):

dependencies = [
('mailtrigger', '0005_slides_proposed'),
]

operations = [
migrations.RunPython(forward,reverse)
]

0 comments on commit 9ace7db

Please sign in to comment.