-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: issue list date filters and properties (#1820)
* dev: start date and target date validation and filter for null dated issues * dev: remove print logs * dev: issue property dates
- Loading branch information
1 parent
11abd3c
commit 0a1483c
Showing
5 changed files
with
53 additions
and
2 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
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,38 @@ | ||
# Generated by Django 4.2.3 on 2023-08-09 11:15 | ||
|
||
from django.db import migrations | ||
|
||
|
||
def update_user_issue_properties(apps, schema_editor): | ||
IssuePropertyModel = apps.get_model("db", "IssueProperty") | ||
updated_issue_properties = [] | ||
for obj in IssuePropertyModel.objects.all(): | ||
obj.properties["start_date"] = True | ||
updated_issue_properties.append(obj) | ||
IssuePropertyModel.objects.bulk_update( | ||
updated_issue_properties, ["properties"], batch_size=100 | ||
) | ||
|
||
|
||
def workspace_member_properties(apps, schema_editor): | ||
WorkspaceMemberModel = apps.get_model("db", "WorkspaceMember") | ||
updated_workspace_members = [] | ||
for obj in WorkspaceMemberModel.objects.all(): | ||
obj.view_props["properties"]["start_date"] = True | ||
obj.default_props["properties"]["start_date"] = True | ||
updated_workspace_members.append(obj) | ||
|
||
WorkspaceMemberModel.objects.bulk_update( | ||
updated_workspace_members, ["view_props", "default_props"], batch_size=100 | ||
) | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("db", "0042_alter_analyticview_created_by_and_more"), | ||
] | ||
|
||
operations = [ | ||
migrations.RunPython(update_user_issue_properties), | ||
migrations.RunPython(workspace_member_properties), | ||
] |
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