diff --git a/ietf/ipr/views.py b/ietf/ipr/views.py index b0589ebc7..a7b11c2ef 100644 --- a/ietf/ipr/views.py +++ b/ietf/ipr/views.py @@ -35,7 +35,7 @@ from ietf.person.models import Person from ietf.secr.utils.document import get_rfc_num, is_draft from ietf.utils.draft_search import normalize_draftname from ietf.utils.mail import send_mail, send_mail_message -from ietf.mailtoken.utils import gather_address_list +from ietf.mailtoken.utils import gather_address_list, gather_addresses # ---------------------------------------------------------------- # Globals @@ -379,7 +379,8 @@ def email(request, id): else: reply_to = get_reply_to() initial = { - 'to': ipr.submitter_email, + 'to': gather_addresses('ipr_disclosure_followup',ipr=ipr), + 'cc': gather_addresses('ipr_disclosure_followup_cc',ipr=ipr), 'frm': settings.IPR_EMAIL_FROM, 'subject': 'Regarding {}'.format(ipr.title), 'reply_to': reply_to, diff --git a/ietf/mailtoken/migrations/0002_auto_20150809_1314.py b/ietf/mailtoken/migrations/0002_auto_20150809_1314.py index fbf0a564e..76ce9d54b 100644 --- a/ietf/mailtoken/migrations/0002_auto_20150809_1314.py +++ b/ietf/mailtoken/migrations/0002_auto_20150809_1314.py @@ -165,6 +165,10 @@ def make_recipients(apps): desc="The ipr disclosure handling system", template='ietf-ipr@ietf.org') + rc(slug='ipr_submitter', + desc="The submitter of an IPR disclosure", + template='{% if ipr.submitter_email %}{{ ipr.submitter_email }}{% endif %}') + rc(slug='logged_in_person', desc="The person currently logged into the datatracker who initiated a given action", template='{% if person and person.email_address %}{{ person.email_address }}{% endif %}') @@ -628,10 +632,19 @@ def make_mailtokens(apps): ]) mt_factory(slug='ipr_disclosure_submitted', - desc="Recipients when an IPR notification is submitted", + desc="Recipients when an IPR disclosure is submitted", recipient_slugs=['ipr_requests', ]) + mt_factory(slug='ipr_disclosure_followup', + desc="Recipients when the secretary follows up on an IPR disclosure submission", + recipient_slugs=['ipr_submitter', + ]) + + mt_factory(slug='ipr_disclosure_followup_cc', + desc="Copied when the secretary follows up on an IPR disclosure submission", + recipient_slugs=[]) + def forward(apps, schema_editor): make_recipients(apps) diff --git a/ietf/name/fixtures/names.json b/ietf/name/fixtures/names.json index 8e854a5bb..c43c08eb3 100644 --- a/ietf/name/fixtures/names.json +++ b/ietf/name/fixtures/names.json @@ -4567,6 +4567,14 @@ "model": "mailtoken.recipient", "pk": "ipr_requests" }, +{ + "fields": { + "template": "{% if ipr.submitter_email %}{{ ipr.submitter_email }}{% endif %}", + "desc": "The submitter of an IPR disclosure" + }, + "model": "mailtoken.recipient", + "pk": "ipr_submitter" +}, { "fields": { "template": "{% if person and person.email_address %}{{ person.email_address }}{% endif %}", @@ -5071,12 +5079,30 @@ "model": "mailtoken.mailtoken", "pk": "group_personnel_change" }, +{ + "fields": { + "recipients": [ + "ipr_submitter" + ], + "desc": "Recipients when the secretary follows up on an IPR disclosure submission" + }, + "model": "mailtoken.mailtoken", + "pk": "ipr_disclosure_followup" +}, +{ + "fields": { + "recipients": [], + "desc": "Copied when the secretary follows up on an IPR disclosure submission" + }, + "model": "mailtoken.mailtoken", + "pk": "ipr_disclosure_followup_cc" +}, { "fields": { "recipients": [ "ipr_requests" ], - "desc": "Recipients when an IPR notification is submitted" + "desc": "Recipients when an IPR disclosure is submitted" }, "model": "mailtoken.mailtoken", "pk": "ipr_disclosure_submitted"