Skip to content

Commit 690c36c

Browse files
committed
Merged [6359] from rjsparks@nostrum.com:
Send email to the secretariat when a status change document is put directly into the last-call-requested state. Fixes bug 1139. - Legacy-Id: 7208 Note: SVN reference [6359] has been migrated to Git commit faabcb8
2 parents 62e7b51 + faabcb8 commit 690c36c

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
@@ -103,6 +103,19 @@ def test_change_state(self):
103103
self.assertTrue(doc.latest_event(DocEvent,type="added_comment").desc.startswith('RDNK84ZD'))
104104
self.assertFalse(doc.active_ballot())
105105

106+
# successful change to Last Call Requested
107+
messages_before = len(outbox)
108+
doc.ad = Person.objects.get(user__username='ad')
109+
doc.save()
110+
lc_req_pk = str(State.objects.get(slug='lc-req',type__slug='statchg').pk)
111+
r = self.client.post(url,dict(new_state=lc_req_pk))
112+
self.assertEquals(r.status_code, 200)
113+
doc = Document.objects.get(name='status-change-imaginary-mid-review')
114+
self.assertEquals(doc.get_state('statchg').slug,'lc-req')
115+
self.assertEquals(len(outbox), messages_before + 1)
116+
self.assertTrue('iesg-secretary' in outbox[-1]['To'])
117+
self.assertTrue('Last Call:' in outbox[-1]['Subject'])
118+
106119
# successful change to IESG Evaluation
107120
iesgeval_pk = str(State.objects.get(slug='iesgeval',type__slug='statchg').pk)
108121
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
@@ -78,6 +78,14 @@ def change_state(request, name, option=None):
7878
send_status_change_eval_email(request,status_change)
7979

8080

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

0 commit comments

Comments
 (0)