diff --git a/apiserver/back_migration.py b/apiserver/back_migration.py index 1ba312934..c1ccc28b5 100644 --- a/apiserver/back_migration.py +++ b/apiserver/back_migration.py @@ -3,8 +3,7 @@ import uuid import random from django.contrib.auth.hashers import make_password from plane.db.models import ProjectIdentifier -from plane.db.models import Issue, IssueComment, User, Project, ProjectMember - +from plane.db.models import Issue, IssueComment, User, Project, ProjectMember, Label # Update description and description html values for old descriptions @@ -148,7 +147,7 @@ def update_user_view_property(): "collapsed": True, "issueView": "list", "filterIssue": None, - "groupByProperty": True, + "groupByProperty": None, "showEmptyGroups": True, } updated_project_members.append(project_member) @@ -161,6 +160,7 @@ def update_user_view_property(): print(e) print("Failed") + def update_label_color(): try: labels = Label.objects.filter(color="") diff --git a/apiserver/plane/db/migrations/0026_alter_projectmember_view_props.py b/apiserver/plane/db/migrations/0026_alter_projectmember_view_props.py new file mode 100644 index 000000000..6f74fa499 --- /dev/null +++ b/apiserver/plane/db/migrations/0026_alter_projectmember_view_props.py @@ -0,0 +1,19 @@ +# Generated by Django 3.2.18 on 2023-04-04 21:50 + +from django.db import migrations, models +import plane.db.models.project + + +class Migration(migrations.Migration): + + dependencies = [ + ('db', '0025_auto_20230331_0203'), + ] + + operations = [ + migrations.AlterField( + model_name='projectmember', + name='view_props', + field=models.JSONField(default=plane.db.models.project.get_default_props), + ), + ] \ No newline at end of file diff --git a/apiserver/plane/db/models/project.py b/apiserver/plane/db/models/project.py index b5ba8f198..04435cadf 100644 --- a/apiserver/plane/db/models/project.py +++ b/apiserver/plane/db/models/project.py @@ -26,7 +26,7 @@ def get_default_props(): "collapsed": True, "issueView": "list", "filterIssue": None, - "groupByProperty": True, + "groupByProperty": None, "showEmptyGroups": True, } @@ -133,7 +133,7 @@ class ProjectMember(ProjectBaseModel): ) comment = models.TextField(blank=True, null=True) role = models.PositiveSmallIntegerField(choices=ROLE_CHOICES, default=10) - view_props = models.JSONField(null=True) + view_props = models.JSONField(default=get_default_props) default_props = models.JSONField(default=get_default_props) class Meta: