forked from github/plane
chore: change field name
This commit is contained in:
parent
57d0dade1f
commit
eb28a5fd59
@ -1049,9 +1049,9 @@ def create_issue_relation_activity(
|
|||||||
if current_instance is None and requested_data.get("related_list") is not None:
|
if current_instance is None and requested_data.get("related_list") is not None:
|
||||||
for issue_relation in requested_data.get("related_list"):
|
for issue_relation in requested_data.get("related_list"):
|
||||||
if issue_relation.get("relation_type") == "blocked_by":
|
if issue_relation.get("relation_type") == "blocked_by":
|
||||||
custom_field = "blocking"
|
relation_type = "blocking"
|
||||||
else:
|
else:
|
||||||
custom_field = issue_relation.get("relation_type")
|
relation_type = issue_relation.get("relation_type")
|
||||||
issue = Issue.objects.get(pk=issue_relation.get("issue"))
|
issue = Issue.objects.get(pk=issue_relation.get("issue"))
|
||||||
issue_activities.append(
|
issue_activities.append(
|
||||||
IssueActivity(
|
IssueActivity(
|
||||||
@ -1060,10 +1060,10 @@ def create_issue_relation_activity(
|
|||||||
verb="created",
|
verb="created",
|
||||||
old_value="",
|
old_value="",
|
||||||
new_value=f"{project.identifier}-{issue.sequence_id}",
|
new_value=f"{project.identifier}-{issue.sequence_id}",
|
||||||
field=custom_field,
|
field=relation_type,
|
||||||
project=project,
|
project=project,
|
||||||
workspace=project.workspace,
|
workspace=project.workspace,
|
||||||
comment=f'added {custom_field} relation',
|
comment=f'added {relation_type} relation',
|
||||||
old_identifier=issue_relation.get("issue"),
|
old_identifier=issue_relation.get("issue"),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@ -1093,9 +1093,9 @@ def delete_issue_relation_activity(
|
|||||||
)
|
)
|
||||||
if current_instance is not None and requested_data.get("related_list") is None:
|
if current_instance is not None and requested_data.get("related_list") is None:
|
||||||
if current_instance.get("relation_type") == "blocked_by":
|
if current_instance.get("relation_type") == "blocked_by":
|
||||||
custom_field = "blocking"
|
relation_type = "blocking"
|
||||||
else:
|
else:
|
||||||
custom_field = current_instance.get("relation_type")
|
relation_type = current_instance.get("relation_type")
|
||||||
issue = Issue.objects.get(pk=current_instance.get("issue"))
|
issue = Issue.objects.get(pk=current_instance.get("issue"))
|
||||||
issue_activities.append(
|
issue_activities.append(
|
||||||
IssueActivity(
|
IssueActivity(
|
||||||
@ -1104,10 +1104,10 @@ def delete_issue_relation_activity(
|
|||||||
verb="deleted",
|
verb="deleted",
|
||||||
old_value="",
|
old_value="",
|
||||||
new_value=f"{project.identifier}-{issue.sequence_id}",
|
new_value=f"{project.identifier}-{issue.sequence_id}",
|
||||||
field=custom_field,
|
field=relation_type,
|
||||||
project=project,
|
project=project,
|
||||||
workspace=project.workspace,
|
workspace=project.workspace,
|
||||||
comment=f'deleted {custom_field} relation',
|
comment=f'deleted {relation_type} relation',
|
||||||
old_identifier=current_instance.get("issue"),
|
old_identifier=current_instance.get("issue"),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user