Skip to content

Commit faabcb8

Browse files
committed
Send email to the secretariat when a status change document is put directly into the last-call-requested state.
Fixes bug 1139. Commit ready for merge. - Legacy-Id: 6359
1 parent d256693 commit faabcb8

2 files changed

Lines changed: 21 additions & 0 deletions

File tree

ietf/doc/tests_status_change.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,19 @@ def test_change_state(self):
106106
self.assertTrue(doc.latest_event(DocEvent,type="added_comment").desc.startswith('RDNK84ZD'))
107107
self.assertFalse(doc.active_ballot())
108108

109+
# successful change to Last Call Requested
110+
messages_before = len(outbox)
111+
doc.ad = Person.objects.get(user__username='ad')
112+
doc.save()
113+
lc_req_pk = str(State.objects.get(slug='lc-req',type__slug='statchg').pk)
114+
r = self.client.post(url,dict(new_state=lc_req_pk))
115+
self.assertEquals(r.status_code, 200)
116+
doc = Document.objects.get(name='status-change-imaginary-mid-review')
117+
self.assertEquals(doc.get_state('statchg').slug,'lc-req')
118+
self.assertEquals(len(outbox), messages_before + 1)
119+
self.assertTrue('iesg-secretary' in outbox[-1]['To'])
120+
self.assertTrue('Last Call:' in outbox[-1]['Subject'])
121+
109122
# successful change to IESG Evaluation
110123
iesgeval_pk = str(State.objects.get(slug='iesgeval',type__slug='statchg').pk)
111124
r = self.client.post(url,dict(new_state=iesgeval_pk,comment='TGmZtEjt'))

ietf/doc/views_status_change.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,14 @@ def change_state(request, name, option=None):
8080
send_status_change_eval_email(request,status_change)
8181

8282

83+
if new_state.slug == "lc-req":
84+
request_last_call(request, status_change)
85+
return render_to_response('doc/draft/last_call_requested.html',
86+
dict(doc=status_change,
87+
url = status_change.get_absolute_url(),
88+
),
89+
context_instance=RequestContext(request))
90+
8391
return redirect('doc_view', name=status_change.name)
8492
else:
8593
s = status_change.get_state()

0 commit comments

Comments
 (0)