Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apiserver/plane/bgtasks/issue_activites_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ def track_assignees(
verb="updated",
old_value=assignee.email,
new_value="",
field="assignee",
field="assignees",
project=project,
workspace=project.workspace,
comment=f"{actor.email} removed assignee {assignee.email}",
Expand Down Expand Up @@ -989,7 +989,7 @@ def create_attachment_activity(
verb="created",
actor=actor,
field="attachment",
new_value=current_instance.get("access", ""),
new_value=current_instance.get("asset", ""),
new_identifier=current_instance.get("id", None),
)
)
Expand Down
26 changes: 26 additions & 0 deletions apiserver/plane/db/migrations/0039_auto_20230723_2203.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Generated by Django 4.2.3 on 2023-07-23 16:33

from django.db import migrations

def rename_field(apps, schema_editor):
Model = apps.get_model("db", "IssueActivity")
updated_activity = []
for obj in Model.objects.filter(field="assignee"):
obj.field = "assignees"
updated_activity.append(obj)

Model.objects.bulk_update(
updated_activity, ["field"], batch_size=100
)



class Migration(migrations.Migration):

dependencies = [
('db', '0038_auto_20230720_1505'),
]

operations = [
migrations.RunPython(rename_field)
]