-
Notifications
You must be signed in to change notification settings - Fork 317
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merged in [17185] from rjsparks@nostrum.com:
Adds support for dateless milestones. Fixes #2799. - Legacy-Id: 17198 Note: SVN reference [17185] has been migrated to Git commit 42e5163
- Loading branch information
Showing
14 changed files
with
541 additions
and
174 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Copyright The IETF Trust 2019-2020, All Rights Reserved | ||
# -*- coding: utf-8 -*- | ||
# Generated by Django 1.11.25 on 2019-10-30 11:41 | ||
from __future__ import unicode_literals | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('group', '0019_rename_field_document2'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='group', | ||
name='uses_milestone_dates', | ||
field=models.BooleanField(default=False), | ||
), | ||
migrations.AddField( | ||
model_name='grouphistory', | ||
name='uses_milestone_dates', | ||
field=models.BooleanField(default=False), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Copyright The IETF Trust 2019-2020, All Rights Reserved | ||
# -*- coding: utf-8 -*- | ||
# Generated by Django 1.11.25 on 2019-10-30 13:37 | ||
from __future__ import unicode_literals | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('group', '0020_add_uses_milestone_dates'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterModelOptions( | ||
name='groupmilestone', | ||
options={'ordering': ['order', 'due', 'id']}, | ||
), | ||
migrations.AlterModelOptions( | ||
name='groupmilestonehistory', | ||
options={'ordering': ['order', 'due', 'id']}, | ||
), | ||
migrations.AddField( | ||
model_name='groupmilestone', | ||
name='order', | ||
field=models.IntegerField(blank=True, null=True), | ||
), | ||
migrations.AddField( | ||
model_name='groupmilestonehistory', | ||
name='order', | ||
field=models.IntegerField(blank=True, null=True), | ||
), | ||
migrations.AlterField( | ||
model_name='groupmilestone', | ||
name='due', | ||
field=models.DateField(blank=True, null=True), | ||
), | ||
migrations.AlterField( | ||
model_name='groupmilestonehistory', | ||
name='due', | ||
field=models.DateField(blank=True, null=True), | ||
), | ||
] |
30 changes: 30 additions & 0 deletions
30
ietf/group/migrations/0022_populate_uses_milestone_dates.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Copyright The IETF Trust 2019-2020, All Rights Reserved | ||
# -*- coding: utf-8 -*- | ||
# Generated by Django 1.11.25 on 2019-10-30 11:42 | ||
from __future__ import unicode_literals | ||
|
||
from django.db import migrations | ||
|
||
def forward(apps, schema_editor): | ||
Group = apps.get_model('group','Group') | ||
GroupHistory = apps.get_model('group','GroupHistory') | ||
|
||
Group.objects.filter(type__features__has_milestones=True).update(uses_milestone_dates=True) | ||
GroupHistory.objects.filter(type__features__has_milestones=True).update(uses_milestone_dates=True) | ||
|
||
def reverse(apps, schema_editor): | ||
Group = apps.get_model('group','Group') | ||
GroupHistory = apps.get_model('group','GroupHistory') | ||
|
||
Group.objects.filter(type__features__has_milestones=True).update(uses_milestone_dates=False) | ||
GroupHistory.objects.filter(type__features__has_milestones=True).update(uses_milestone_dates=False) | ||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('group', '0021_add_order_to_milestones'), | ||
] | ||
|
||
operations = [ | ||
migrations.RunPython(forward, reverse) | ||
] |
Oops, something went wrong.