Merged in [12104] from rjsparks@nostrum.com:

Don't show the request publication button for ise,irtf, and iab drafts after publication has already been requested. Fixes #2019.
 - Legacy-Id: 12122
Note: SVN reference [12104] has been migrated to Git commit 933134f4cc
This commit is contained in:
Henrik Levkowetz 2016-10-12 18:39:22 +00:00
commit 99b22efc96
2 changed files with 12 additions and 6 deletions

View file

@ -804,6 +804,11 @@ class DocTestCase(TestCase):
self.assertEqual(r.status_code, 200)
self.assertTrue("Request publication" in unicontent(r))
doc.states.add(State.objects.get(type_id='draft-stream-iab',slug='rfc-edit'))
r = self.client.get(urlreverse("doc_view", kwargs=dict(name=doc.name)))
self.assertEqual(r.status_code, 200)
self.assertTrue("Request publication" not in unicontent(r))
class AddCommentTestCase(TestCase):
def test_add_comment(self):

View file

@ -334,12 +334,13 @@ def document_main(request, name, rev=None):
if (doc.get_state_slug() not in ["rfc", "expired"] and doc.stream_id in ("iab", "ise", "irtf")
and can_edit_stream_info and not snapshot):
label = "Request Publication"
if not doc.intended_std_level:
label += " (note that intended status is not set)"
if iesg_state and iesg_state.slug != 'dead':
label += " (Warning: the IESG state indicates ongoing IESG processing)"
actions.append((label, urlreverse('doc_request_publication', kwargs=dict(name=doc.name))))
if doc.get_state_slug('draft-stream-%s' % doc.stream_id) not in ('rfc-edit', 'pub', 'dead'):
label = "Request Publication"
if not doc.intended_std_level:
label += " (note that intended status is not set)"
if iesg_state and iesg_state.slug != 'dead':
label += " (Warning: the IESG state indicates ongoing IESG processing)"
actions.append((label, urlreverse('doc_request_publication', kwargs=dict(name=doc.name))))
if doc.get_state_slug() not in ["rfc", "expired"] and doc.stream_id in ("ietf",) and not snapshot:
if not iesg_state and can_edit: