Add a flag for groups to indicate meetings should always be seen as area meetings.
This impacts scheduling, because area meetings should not conflict with any other session from their area. However, several area meetings have type WG, and therefore look like ordinary WGs apart from meeting scheduling conflicts. This new flag will allow distinguishing regular WGs from WGs whose meetings must not conflict with anything else from their area. The included migration sets this flag for the currently known area meetings: dispatch, gendispatch, intarea, opsarea/opsawg, rtgarea, rtgwg, saag, secdispatch, tsvarea, irtfopen - Legacy-Id: 17290
This commit is contained in:
parent
a227813dc5
commit
aaa8180358
37
ietf/group/migrations/0023_add_meeting_seen_as_area.py
Normal file
37
ietf/group/migrations/0023_add_meeting_seen_as_area.py
Normal file
|
@ -0,0 +1,37 @@
|
|||
# Copyright The IETF Trust 2020', 'All Rights Reserved
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11.27 on 2020-02-12 07:11
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
def forward(apps, schema_editor):
|
||||
Group = apps.get_model('group', 'Group')
|
||||
initial_area_groups = ['dispatch', 'gendispatch', 'intarea', 'opsarea/opsawg', 'rtgarea', 'rtgwg', 'saag', 'secdispatch', 'tsvarea', 'irtfopen']
|
||||
Group.objects.filter(acronym__in=initial_area_groups).update(meeting_seen_as_area=True)
|
||||
|
||||
|
||||
def reverse(apps, schema_editor):
|
||||
pass
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('group', '0022_populate_uses_milestone_dates'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='group',
|
||||
name='meeting_seen_as_area',
|
||||
field=models.BooleanField(default=False, help_text='For meeting scheduling, should be considered an area meeting, even if the type is WG'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='grouphistory',
|
||||
name='meeting_seen_as_area',
|
||||
field=models.BooleanField(default=False, help_text='For meeting scheduling, should be considered an area meeting, even if the type is WG'),
|
||||
),
|
||||
migrations.RunPython(forward, reverse),
|
||||
]
|
|
@ -36,6 +36,7 @@ class GroupInfo(models.Model):
|
|||
name = models.CharField(max_length=80)
|
||||
state = ForeignKey(GroupStateName, null=True)
|
||||
type = ForeignKey(GroupTypeName, null=True)
|
||||
meeting_seen_as_area = models.BooleanField(default=False, help_text='For meeting scheduling, should be considered an area meeting, even if the type is WG')
|
||||
parent = ForeignKey('Group', blank=True, null=True)
|
||||
description = models.TextField(blank=True)
|
||||
list_email = models.CharField(max_length=64, blank=True)
|
||||
|
|
Loading…
Reference in a new issue