Re-introduce Group.meeting_seen_as_area and use it in automatic scheduler
- Legacy-Id: 17901
This commit is contained in:
parent
468afdcbe3
commit
57d8ffb27a
37
ietf/group/migrations/0024_add_meeting_seen_as_area.py
Normal file
37
ietf/group/migrations/0024_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', '0023_use_milestone_dates_default_to_true'),
|
||||
]
|
||||
|
||||
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),
|
||||
]
|
|
@ -39,7 +39,8 @@ class GroupInfo(models.Model):
|
|||
list_subscribe = models.CharField(max_length=255, blank=True)
|
||||
list_archive = models.CharField(max_length=255, blank=True)
|
||||
comments = models.TextField(blank=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')
|
||||
|
||||
unused_states = models.ManyToManyField('doc.State', help_text="Document states that have been disabled for the group.", blank=True)
|
||||
unused_tags = models.ManyToManyField(DocTagName, help_text="Document tags that have been disabled for the group.", blank=True)
|
||||
|
||||
|
|
|
@ -462,9 +462,7 @@ class Session(object):
|
|||
self.is_area_meeting = any([
|
||||
session_db.group.type_id == 'area',
|
||||
session_db.group.type_id == 'ag',
|
||||
self.group in ['dispatch', 'gendispatch', 'intarea', 'opsarea/opsawg', 'rtgarea',
|
||||
'rtgwg', 'saag', 'secdispatch', 'tsvarea', 'irtfopen']
|
||||
# meeting_seen_as_area TODO
|
||||
session_db.group.meeting_seen_as_area,
|
||||
])
|
||||
self.is_bof = session_db.group.state_id == 'bof'
|
||||
self.is_prg = session_db.group.type_id == 'rg' and session_db.group.state_id == 'proposed'
|
||||
|
|
Loading…
Reference in a new issue