forked from github/plane
fix: issue activity for attachments (#1626)
* fix: issue activity for attachments * fix: issue activity assignees
This commit is contained in:
parent
479dfc17f5
commit
27402b52b6
@ -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}",
|
||||
@ -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),
|
||||
)
|
||||
)
|
||||
|
26
apiserver/plane/db/migrations/0039_auto_20230723_2203.py
Normal file
26
apiserver/plane/db/migrations/0039_auto_20230723_2203.py
Normal file
@ -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)
|
||||
]
|
Loading…
Reference in New Issue
Block a user