diff --git a/ietf/name/fixtures/names.json b/ietf/name/fixtures/names.json index b1a7aab1d..c749f0a27 100644 --- a/ietf/name/fixtures/names.json +++ b/ietf/name/fixtures/names.json @@ -6323,7 +6323,6 @@ { "fields": { "desc": "", - "editor_label": "{count}", "is_group_conflict": false, "name": "Person must be present", "order": 4, @@ -6336,7 +6335,6 @@ { "fields": { "desc": "Indicates other WGs the chairs also lead or will be active participants in", - "editor_label": "", "is_group_conflict": true, "name": "Chair conflict", "order": 8, @@ -6349,7 +6347,6 @@ { "fields": { "desc": "", - "editor_label": "2", "is_group_conflict": true, "name": "Conflicts with (secondary)", "order": 2, @@ -6362,7 +6359,6 @@ { "fields": { "desc": "", - "editor_label": "3", "is_group_conflict": true, "name": "Conflicts with (tertiary)", "order": 3, @@ -6375,7 +6371,6 @@ { "fields": { "desc": "", - "editor_label": "1", "is_group_conflict": true, "name": "Conflicts with", "order": 1, @@ -6388,7 +6383,6 @@ { "fields": { "desc": "Indicates WGs with which key participants (presenter, secretary, etc.) may overlap", - "editor_label": "", "is_group_conflict": true, "name": "Key participant conflict", "order": 10, @@ -6401,7 +6395,6 @@ { "fields": { "desc": "Indicates WGs with a related technology or a closely related charter", - "editor_label": "", "is_group_conflict": true, "name": "Technology overlap", "order": 9, @@ -6414,7 +6407,6 @@ { "fields": { "desc": "", - "editor_label": "Δ", "is_group_conflict": false, "name": "Preference for time between sessions", "order": 6, @@ -6427,7 +6419,6 @@ { "fields": { "desc": "", - "editor_label": "", "is_group_conflict": false, "name": "Can't meet within timerange", "order": 5, @@ -6440,7 +6431,6 @@ { "fields": { "desc": "", - "editor_label": "", "is_group_conflict": false, "name": "Request for adjacent scheduling with another WG", "order": 7, diff --git a/ietf/name/migrations/0039_depopulate_constraintname_editor_label.py b/ietf/name/migrations/0039_depopulate_constraintname_editor_label.py new file mode 100644 index 000000000..9949002be --- /dev/null +++ b/ietf/name/migrations/0039_depopulate_constraintname_editor_label.py @@ -0,0 +1,39 @@ +# Generated by Django 2.2.27 on 2022-03-11 07:55 + +from django.db import migrations + + +def forward(apps, schema_editor): + pass # nothing to do, row will be dropped + + +def reverse(apps, schema_editor): + # Restore data from when this migration was written. Dumped with: + # >>> from pprint import pp + # >>> from ietf.name.models import ConstraintName + # >>> pp(list(ConstraintName.objects.values_list('slug', 'editor_label'))) + ConstraintName = apps.get_model('name', 'ConstraintName') + for slug, editor_label in [ + ('conflict', '1'), + ('conflic2', '2'), + ('conflic3', '3'), + ('bethere', '{count}'), + ('timerange', ''), + ('time_relation', 'Δ'), + ('wg_adjacent', ''), + ('chair_conflict', ''), + ('tech_overlap', ''), + ('key_participant', ''), + ]: + ConstraintName.objects.filter(slug=slug).update(editor_label=editor_label) + + +class Migration(migrations.Migration): + + dependencies = [ + ('name', '0038_disuse_offagenda_and_reserved'), + ] + + operations = [ + migrations.RunPython(forward, reverse) + ] diff --git a/ietf/name/migrations/0040_remove_constraintname_editor_label.py b/ietf/name/migrations/0040_remove_constraintname_editor_label.py new file mode 100644 index 000000000..85390c77a --- /dev/null +++ b/ietf/name/migrations/0040_remove_constraintname_editor_label.py @@ -0,0 +1,17 @@ +# Generated by Django 2.2.27 on 2022-03-11 10:05 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('name', '0039_depopulate_constraintname_editor_label'), + ] + + operations = [ + migrations.RemoveField( + model_name='constraintname', + name='editor_label', + ), + ] diff --git a/ietf/name/models.py b/ietf/name/models.py index e797c7782..f0d56523d 100644 --- a/ietf/name/models.py +++ b/ietf/name/models.py @@ -85,7 +85,6 @@ class TimeSlotTypeName(NameModel): class ConstraintName(NameModel): """conflict, conflic2, conflic3, bethere, timerange, time_relation, wg_adjacent""" penalty = models.IntegerField(default=0, help_text="The penalty for violating this kind of constraint; for instance 10 (small penalty) or 10000 (large penalty)") - editor_label = models.CharField(max_length=64, blank=True, help_text="Very short label for producing warnings inline in the sessions in the schedule editor.") is_group_conflict = models.BooleanField(default=False, help_text="Does this constraint capture a conflict between groups?") class TimerangeName(NameModel): """(monday|tuesday|wednesday|thursday|friday)-(morning|afternoon-early|afternoon-late)"""