diff --git a/ietf/ietfworkflows/fixtures/initial_data.xml b/ietf/ietfworkflows/fixtures/initial_data.xml index f78fdce7f..a8901f482 100644 --- a/ietf/ietfworkflows/fixtures/initial_data.xml +++ b/ietf/ietfworkflows/fixtures/initial_data.xml @@ -458,4 +458,248 @@ 4 + + 11 + <a href="http://tools.ietf.org/html/rfc6174#section-4.2.1" target="_blank">4.2.1. Call for Adoption by WG Issued</a> + + + The "Call for Adoption by WG Issued" state should be used to indicate + when an I-D is being considered for adoption by an IETF WG. An I-D + that is in this state is actively being considered for adoption and + has not yet achieved consensus, preference, or selection in the WG. + + This state may be used to describe an I-D that someone has asked a WG + to consider for adoption, if the WG Chair has agreed with the + request. This state may also be used to identify an I-D that a WG + Chair asked an author to write specifically for consideration as a + candidate WG item [WGDTSPEC], and/or an I-D that is listed as a + 'candidate draft' in the WG's charter. + + Under normal conditions, it should not be possible for an I-D to be + in the "Call for Adoption by WG Issued" state in more than one + working group at the same time. This said, it is not uncommon for + authors to "shop" their I-Ds to more than one WG at a time, with the + hope of getting their documents adopted somewhere. + + After this state is implemented in the Datatracker, an I-D that is in + the "Call for Adoption by WG Issued" state will not be able to be + "shopped" to any other WG without the consent of the WG Chairs and + the responsible ADs impacted by the shopping. + + Note that Figure 1 includes an arc leading from this state to outside + of the WG state machine. This illustrates that some I-Ds that are + considered do not get adopted as WG drafts. An I-D that is not + adopted as a WG draft will transition out of the WG state machine and + revert back to having no stream-specific state; however, the status + change history log of the I-D will record that the I-D was previously + in the "Call for Adoption by WG Issued" state. + + 1 + + + 12 + <a href="http://tools.ietf.org/html/rfc6174#section-4.2.2" target="_blank">4.2.2. Adopted by a WG</a> + + + The "Adopted by a WG" state describes an individual submission I-D + that an IETF WG has agreed to adopt as one of its WG drafts. + + WG Chairs who use this state will be able to clearly indicate when + their WGs adopt individual submission I-Ds. This will facilitate the + Datatracker's ability to correctly capture "Replaces" information for + WG drafts and correct "Replaced by" information for individual + submission I-Ds that have been replaced by WG drafts. + + This state is needed because the Datatracker uses the filename of an + I-D as a key to search its database for status information about the + I-D, and because the filename of a WG I-D is supposed to be different + from the filename of an individual submission I-D. + The filename of an individual submission I-D will typically be + formatted as 'draft-author-wgname-topic-nn'. + + The filename of a WG document is supposed to be formatted as 'draft- + ietf-wgname-topic-nn'. + + An individual I-D that is adopted by a WG may take weeks or months to + be resubmitted by the author as a new (version-00) WG draft. If the + "Adopted by a WG" state is not used, the Datatracker has no way to + determine that an I-D has been adopted until a new version of the I-D + is submitted to the WG by the author and until the I-D is approved + for posting by a WG Chair. + + 2 + + + 13 + <a href="http://tools.ietf.org/html/rfc6174#section-4.2.3" target="_blank">4.2.3. Adopted for WG Info Only</a> + + + The "Adopted for WG Info Only" state describes a document that + contains useful information for the WG that adopted it, but the + document is not intended to be published as an RFC. The WG will not + actively develop the contents of the I-D or progress it for + publication as an RFC. The only purpose of the I-D is to provide + information for internal use by the WG. + + 3 + + + 14 + <a href="http://tools.ietf.org/html/rfc6174#section-4.2.4" target="_blank">4.2.4. WG Document</a> + + + The "WG Document" state describes an I-D that has been adopted by an + IETF WG and is being actively developed. + + A WG Chair may transition an I-D into the "WG Document" state at any + time as long as the I-D is not being considered or developed in any + other WG. + + Alternatively, WG Chairs may rely upon new functionality to be added + to the Datatracker to automatically move version-00 drafts into the + "WG Document" state as described in Section 4.1. + + Under normal conditions, it should not be possible for an I-D to be + in the "WG Document" state in more than one WG at a time. This said, + I-Ds may be transferred from one WG to another with the consent of + the WG Chairs and the responsible ADs. + + + 4 + + + 15 + <a href="http://tools.ietf.org/html/rfc6174#section-4.2.5" target="_blank">4.2.5. Parked WG Document</a> + + + A "Parked WG Document" is an I-D that has lost its author or editor, + is waiting for another document to be written or for a review to be + completed, or cannot be progressed by the working group for some + other reason. + + Some of the annotation tags described in Section 4.3 may be used in + conjunction with this state to indicate why an I-D has been parked, + and/or what may need to happen for the I-D to be un-parked. + + Parking a WG draft will not prevent it from expiring; however, this + state can be used to indicate why the I-D has stopped progressing in + the WG. + + A "Parked WG Document" that is not expired may be transferred from + one WG to another with the consent of the WG Chairs and the + responsible ADs. + + + 5 + + + 16 + <a href="http://tools.ietf.org/html/rfc6174#section-4.2.6" target="_blank">4.2.6. Dead WG Document</a> + + + A "Dead WG Document" is an I-D that has been abandoned. Note that + 'Dead' is not always a final state for a WG I-D. If consensus is + subsequently achieved, a "Dead WG Document" may be resurrected. A + "Dead WG Document" that is not resurrected will eventually expire. + + Note that an I-D that is declared to be "Dead" in one WG and that is + not expired may be transferred to a non-dead state in another WG with + the consent of the WG Chairs and the responsible ADs. + + + 6 + + + 17 + <a href="http://tools.ietf.org/html/rfc6174#section-4.2.7" target="_blank">4.2.7. In WG Last Call</a> + + + A document "In WG Last Call" is an I-D for which a WG Last Call + (WGLC) has been issued and is in progress. + + Note that conducting a WGLC is an optional part of the IETF WG + process, per Section 7.4 of RFC 2418 [RFC2418]. + + If a WG Chair decides to conduct a WGLC on an I-D, the "In WG Last + Call" state can be used to track the progress of the WGLC. The Chair + may configure the Datatracker to send a WGLC message to one or more + mailing lists when the Chair moves the I-D into this state. The WG + Chair may also be able to select a different set of mailing lists for + a different document undergoing a WGLC; some documents may deserve + coordination with other WGs. + + A WG I-D in this state should remain "In WG Last Call" until the WG + Chair moves it to another state. The WG Chair may configure the + Datatracker to send an e-mail after a specified period of time to + remind or 'nudge' the Chair to conclude the WGLC and to determine the + next state for the document. + + It is possible for one WGLC to lead into another WGLC for the same + document. For example, an I-D that completed a WGLC as an + "Informational" document may need another WGLC if a decision is taken + to convert the I-D into a Standards Track document. + + + 7 + + + 18 + <a href="http://tools.ietf.org/html/rfc6174#section-4.2.8" target="_blank">4.2.8. Waiting for WG Chair Go-Ahead</a> + + + A WG Chair may wish to place an I-D that receives a lot of comments + during a WGLC into the "Waiting for WG Chair Go-Ahead" state. This + state describes an I-D that has undergone a WGLC; however, the Chair + is not yet ready to call consensus on the document. + + If comments from the WGLC need to be responded to, or a revision to + the I-D is needed, the Chair may place an I-D into this state until + all of the WGLC comments are adequately addressed and the (possibly + revised) document is in the I-D repository. + + + 8 + + + 19 + <a href="http://tools.ietf.org/html/rfc6174#section-4.2.9" target="_blank">4.2.9. WG Consensus: Waiting for Writeup</a> + + + A document in the "WG Consensus: Waiting for Writeup" state has + essentially completed its development within the working group, and + is nearly ready to be sent to the IESG for publication. The last + thing to be done is the preparation of a protocol writeup by a + Document Shepherd. The IESG requires that a document shepherd + writeup be completed before publication of the I-D is requested. The + IETF document shepherding process and the role of a WG Document + Shepherd is described in RFC 4858 [RFC4858] + + A WG Chair may call consensus on an I-D without a formal WGLC and + transition an I-D that was in the "WG Document" state directly into + this state. + + The name of this state includes the words "Waiting for Writeup" + because a good document shepherd writeup takes time to prepare. + + + 9 + + + 20 + <a href="http://tools.ietf.org/html/rfc6174#section-4.2.10" target="_blank">4.2.10. Submitted to IESG for Publication</a> + + + This state describes a WG document that has been submitted to the + IESG for publication and that has not been sent back to the working + group for revision. + + An I-D in this state may be under review by the IESG, it may have + been approved and be in the RFC Editor's queue, or it may have been + published as an RFC. Other possibilities exist too. The document + may be "Dead" (in the IESG state machine) or in a "Do Not Publish" + state. + + + 10 + diff --git a/ietf/ietfworkflows/migrations/0010_add_state_definitions.py b/ietf/ietfworkflows/migrations/0010_add_state_definitions.py new file mode 100644 index 000000000..503943c56 --- /dev/null +++ b/ietf/ietfworkflows/migrations/0010_add_state_definitions.py @@ -0,0 +1,207 @@ + +from south.db import db +from django.db import models +from ietf.ietfworkflows.models import * + +class Migration: + + def forwards(self, orm): + + # Adding model 'StateDescription' + db.create_table('ietfworkflows_statedescription', ( + ('id', orm['ietfworkflows.statedescription:id']), + ('state', orm['ietfworkflows.statedescription:state']), + ('definition', orm['ietfworkflows.statedescription:definition']), + ('order', orm['ietfworkflows.statedescription:order']), + )) + db.send_create_signal('ietfworkflows', ['StateDescription']) + + + + def backwards(self, orm): + + # Deleting model 'StateDescription' + db.delete_table('ietfworkflows_statedescription') + + + + models = { + 'contenttypes.contenttype': { + 'Meta': {'unique_together': "(('app_label', 'model'),)", 'db_table': "'django_content_type'"}, + 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) + }, + 'idtracker.acronym': { + 'Meta': {'db_table': "'acronym'"}, + 'acronym': ('django.db.models.fields.CharField', [], {'max_length': '12'}), + 'acronym_id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'name_key': ('django.db.models.fields.CharField', [], {'max_length': '50'}) + }, + 'idtracker.idintendedstatus': { + 'Meta': {'db_table': "'id_intended_status'"}, + 'intended_status': ('django.db.models.fields.CharField', [], {'max_length': '25', 'db_column': "'status_value'"}), + 'intended_status_id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) + }, + 'idtracker.idstatus': { + 'Meta': {'db_table': "'id_status'"}, + 'status': ('django.db.models.fields.CharField', [], {'max_length': '25', 'db_column': "'status_value'"}), + 'status_id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) + }, + 'idtracker.internetdraft': { + 'Meta': {'db_table': "'internet_drafts'"}, + 'abstract': ('django.db.models.fields.TextField', [], {}), + 'b_approve_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), + 'b_discussion_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), + 'b_sent_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), + 'comments': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'dunn_sent_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), + 'expiration_date': ('django.db.models.fields.DateField', [], {'null': 'True'}), + 'expired_tombstone': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}), + 'extension_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), + 'file_type': ('django.db.models.fields.CharField', [], {'max_length': '20'}), + 'filename': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), + 'group': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['idtracker.Acronym']", 'db_column': "'group_acronym_id'"}), + 'id_document_key': ('django.db.models.fields.CharField', [], {'max_length': '255'}), + 'id_document_tag': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'intended_status': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['idtracker.IDIntendedStatus']"}), + 'last_modified_date': ('django.db.models.fields.DateField', [], {}), + 'lc_changes': ('django.db.models.fields.CharField', [], {'max_length': '3', 'null': 'True'}), + 'lc_expiration_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), + 'lc_sent_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), + 'local_path': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), + 'replaced_by': ('django.db.models.fields.related.ForeignKey', ["orm['idtracker.InternetDraft']"], {'related_name': "'replaces_set'", 'null': 'True', 'db_column': "'replaced_by'", 'blank': 'True'}), + 'review_by_rfc_editor': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}), + 'revision': ('django.db.models.fields.CharField', [], {'max_length': '2'}), + 'revision_date': ('django.db.models.fields.DateField', [], {}), + 'rfc_number': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), + 'shepherd': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['idtracker.PersonOrOrgInfo']", 'null': 'True', 'blank': 'True'}), + 'start_date': ('django.db.models.fields.DateField', [], {}), + 'status': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['idtracker.IDStatus']"}), + 'title': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_column': "'id_document_name'"}), + 'txt_page_count': ('django.db.models.fields.IntegerField', [], {}), + 'wgreturn_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}) + }, + 'idtracker.personororginfo': { + 'Meta': {'db_table': "'person_or_org_info'"}, + 'address_type': ('django.db.models.fields.CharField', [], {'max_length': '4', 'null': 'True', 'blank': 'True'}), + 'created_by': ('django.db.models.fields.CharField', [], {'max_length': '8', 'null': 'True', 'blank': 'True'}), + 'date_created': ('django.db.models.fields.DateField', [], {'auto_now_add': 'True', 'null': 'True', 'blank': 'True'}), + 'date_modified': ('django.db.models.fields.DateField', [], {'auto_now': 'True', 'null': 'True', 'blank': 'True'}), + 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '20', 'blank': 'True'}), + 'first_name_key': ('django.db.models.fields.CharField', [], {'max_length': '20', 'blank': 'True'}), + 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}), + 'last_name_key': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}), + 'middle_initial': ('django.db.models.fields.CharField', [], {'max_length': '4', 'null': 'True', 'blank': 'True'}), + 'middle_initial_key': ('django.db.models.fields.CharField', [], {'max_length': '4', 'null': 'True', 'blank': 'True'}), + 'modified_by': ('django.db.models.fields.CharField', [], {'max_length': '8', 'null': 'True', 'blank': 'True'}), + 'name_prefix': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), + 'name_suffix': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), + 'person_or_org_tag': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'record_type': ('django.db.models.fields.CharField', [], {'max_length': '8', 'null': 'True', 'blank': 'True'}) + }, + 'ietfworkflows.annotationtag': { + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'permission': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['permissions.Permission']", 'null': 'True', 'blank': 'True'}), + 'workflow': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'annotation_tags'", 'to': "orm['workflows.Workflow']"}) + }, + 'ietfworkflows.annotationtagobjectrelation': { + 'annotation_tag': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ietfworkflows.AnnotationTag']"}), + 'content_id': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}), + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'annotation_tags'", 'null': 'True', 'to': "orm['contenttypes.ContentType']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) + }, + 'ietfworkflows.objectannotationtaghistoryentry': { + 'objecthistoryentry_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['ietfworkflows.ObjectHistoryEntry']", 'unique': 'True', 'primary_key': 'True'}), + 'setted': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'unsetted': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}) + }, + 'ietfworkflows.objecthistoryentry': { + 'comment': ('django.db.models.fields.TextField', [], {}), + 'content_id': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}), + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'workflow_history'", 'null': 'True', 'to': "orm['contenttypes.ContentType']"}), + 'date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'person': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['idtracker.PersonOrOrgInfo']"}) + }, + 'ietfworkflows.objectstreamhistoryentry': { + 'from_stream': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'objecthistoryentry_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['ietfworkflows.ObjectHistoryEntry']", 'unique': 'True', 'primary_key': 'True'}), + 'to_stream': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}) + }, + 'ietfworkflows.objectworkflowhistoryentry': { + 'from_state': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'objecthistoryentry_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['ietfworkflows.ObjectHistoryEntry']", 'unique': 'True', 'primary_key': 'True'}), + 'to_state': ('django.db.models.fields.CharField', [], {'max_length': '100'}) + }, + 'ietfworkflows.statedescription': { + 'definition': ('django.db.models.fields.TextField', [], {}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'order': ('django.db.models.fields.PositiveIntegerField', [], {}), + 'state': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['workflows.State']"}) + }, + 'ietfworkflows.stateobjectrelationmetadata': { + 'estimated_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), + 'from_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'relation': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['workflows.StateObjectRelation']"}) + }, + 'ietfworkflows.stream': { + 'group_chair_model': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), + 'group_model': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'with_groups': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}), + 'workflow': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ietfworkflows.WGWorkflow']"}) + }, + 'ietfworkflows.streamedid': { + 'content_id': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}), + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'streamed_id'", 'null': 'True', 'to': "orm['contenttypes.ContentType']"}), + 'draft': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['idtracker.InternetDraft']", 'unique': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'stream': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ietfworkflows.Stream']", 'null': 'True', 'blank': 'True'}) + }, + 'ietfworkflows.wgworkflow': { + 'selected_states': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['workflows.State']", 'null': 'True', 'blank': 'True'}), + 'selected_tags': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['ietfworkflows.AnnotationTag']", 'null': 'True', 'blank': 'True'}), + 'workflow_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['workflows.Workflow']", 'unique': 'True', 'primary_key': 'True'}) + }, + 'permissions.permission': { + 'codename': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}), + 'content_types': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['contenttypes.ContentType']", 'null': 'True', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) + }, + 'workflows.state': { + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'transitions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['workflows.Transition']", 'null': 'True', 'blank': 'True'}), + 'workflow': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'states'", 'to': "orm['workflows.Workflow']"}) + }, + 'workflows.stateobjectrelation': { + 'Meta': {'unique_together': "(('content_type', 'content_id', 'state'),)"}, + 'content_id': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}), + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'state_object'", 'null': 'True', 'to': "orm['contenttypes.ContentType']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'state': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['workflows.State']"}) + }, + 'workflows.transition': { + 'condition': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), + 'destination': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'destination_state'", 'null': 'True', 'to': "orm['workflows.State']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'permission': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['permissions.Permission']", 'null': 'True', 'blank': 'True'}), + 'workflow': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'transitions'", 'to': "orm['workflows.Workflow']"}) + }, + 'workflows.workflow': { + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'initial_state': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'workflow_state'", 'null': 'True', 'to': "orm['workflows.State']"}), + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}), + 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['permissions.Permission']", 'symmetrical': 'False'}) + } + } + + complete_apps = ['ietfworkflows'] diff --git a/ietf/ietfworkflows/models.py b/ietf/ietfworkflows/models.py index f0ded3a14..b73261975 100644 --- a/ietf/ietfworkflows/models.py +++ b/ietf/ietfworkflows/models.py @@ -76,6 +76,18 @@ class ObjectStreamHistoryEntry(ObjectHistoryEntry): return html +class StateDescription(models.Model): + state = models.ForeignKey(State) + definition = models.TextField() + order = models.PositiveIntegerField() + + class Meta: + ordering = ('order', ) + + def __unicode__(self): + return unicode(self.state) + + class AnnotationTag(models.Model): name = models.CharField(_(u"Name"), max_length=100) workflow = models.ForeignKey(Workflow, verbose_name=_(u"Workflow"), related_name="annotation_tags") diff --git a/ietf/templates/wgchairs/manage_workflow.html b/ietf/templates/wgchairs/manage_workflow.html index 8c1b4ed02..fe89106a0 100644 --- a/ietf/templates/wgchairs/manage_workflow.html +++ b/ietf/templates/wgchairs/manage_workflow.html @@ -71,15 +71,23 @@
+

+Please note that the states you can not uncheck are needed in all IETF WG. +

- + {% for state in default_states %} - + + {% endfor %}
Used in {{ wg }}Available statesUsed in {{ wg }}Available statesDefinition
+
+
[+] {{ state.statedescription_set.all.0.definition|safe }}
+
+
@@ -132,6 +140,19 @@ if (url[1]) { } } } + +jQuery('.showDefinition').click(function() { + jQuery(this).parent().parent().css('height', 'auto'); + jQuery(this).hide(); + jQuery(this).next().show(); + return false; +}); +jQuery('.hideDefinition').click(function() { + jQuery(this).parent().parent().css('height', '1em'); + jQuery(this).hide(); + jQuery(this).prev().show(); + return false; +}); //]]> diff --git a/ietf/wgchairs/views.py b/ietf/wgchairs/views.py index 11ee6ea14..2e33543ff 100644 --- a/ietf/wgchairs/views.py +++ b/ietf/wgchairs/views.py @@ -66,8 +66,8 @@ def manage_workflow(request, acronym): formset = form tags = workflow.selected_tags.all() default_tags = default_workflow.annotation_tags.all() - states = workflow.selected_states.all() - default_states = default_workflow.states.all() + states = workflow.selected_states.all().order_by('statedescription__order') + default_states = default_workflow.states.all().order_by('statedescription__order') for i in default_states: if states.filter(name=i.name).count() == 1: i.used = True