Skip to content

Commit 5532512

Browse files
Allowing adding documents in AD is watching state in addition to the default Publication Requested state. Trac ietf-tools#684
- Legacy-Id: 3249
1 parent 867019f commit 5532512

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

ietf/idrfc/views_edit.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ class EditInfoForm(forms.Form):
8888
area_acronym = forms.ModelChoiceField(Area.active_areas(), required=True, empty_label=None)
8989
via_rfc_editor = forms.BooleanField(required=False, label="Via IRTF or RFC Editor")
9090
job_owner = forms.ModelChoiceField(IESGLogin.objects.filter(user_level__in=(IESGLogin.AD_LEVEL, IESGLogin.INACTIVE_AD_LEVEL)).order_by('user_level', 'last_name'), label="Responsible AD", empty_label=None, required=True)
91+
create_in_state = forms.ModelChoiceField(IDState.objects.filter(document_state_id__in=(IDState.PUBLICATION_REQUESTED, IDState.AD_WATCHING)), empty_label=None, required=True)
9192
state_change_notice_to = forms.CharField(max_length=255, label="Notice emails", help_text="Separate email addresses with commas", required=False)
9293
note = forms.CharField(widget=forms.Textarea, label="IESG note", required=False)
9394
telechat_date = forms.TypedChoiceField(coerce=lambda x: datetime.datetime.strptime(x, '%Y-%m-%d').date(), empty_value=None, required=False)
@@ -212,6 +213,8 @@ def edit_info(request, name):
212213
r = form.cleaned_data
213214
entry = "%s has been changed to <b>%s</b> from <b>%s</b>"
214215
if new_document:
216+
doc.idinternal.cur_state_id=r['create_in_state'].document_state_id
217+
doc.idinternal.prev_state_id=r['create_in_state'].document_state_id
215218
# Django barfs in the diff below because these fields
216219
# can't be NULL
217220
doc.idinternal.job_owner = r['job_owner']

0 commit comments

Comments
 (0)