mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
fix: module issue updation and activity logging
This commit is contained in:
parent
f09c9b67f6
commit
8801a291af
@ -165,10 +165,10 @@ class ModuleIssueViewSet(BaseViewSet):
|
|||||||
]
|
]
|
||||||
|
|
||||||
if len(module_issue):
|
if len(module_issue):
|
||||||
if module_issue[0].cycle_id != module_id:
|
if module_issue[0].module_id != module_id:
|
||||||
update_module_issue_activity.append(
|
update_module_issue_activity.append(
|
||||||
{
|
{
|
||||||
"old_module_id": str(module_issue[0].cycle_id),
|
"old_module_id": str(module_issue[0].module_id),
|
||||||
"new_module_id": str(module_id),
|
"new_module_id": str(module_id),
|
||||||
"issue_id": str(module_issue[0].issue_id),
|
"issue_id": str(module_issue[0].issue_id),
|
||||||
}
|
}
|
||||||
@ -179,7 +179,7 @@ class ModuleIssueViewSet(BaseViewSet):
|
|||||||
record_to_create.append(
|
record_to_create.append(
|
||||||
ModuleIssue(
|
ModuleIssue(
|
||||||
module=module,
|
module=module,
|
||||||
issue_id=issue,
|
issue=issue,
|
||||||
project_id=project_id,
|
project_id=project_id,
|
||||||
workspace=module.workspace,
|
workspace=module.workspace,
|
||||||
created_by=request.user,
|
created_by=request.user,
|
||||||
@ -203,14 +203,14 @@ class ModuleIssueViewSet(BaseViewSet):
|
|||||||
issue_activity.delay(
|
issue_activity.delay(
|
||||||
{
|
{
|
||||||
"type": "issue.activity",
|
"type": "issue.activity",
|
||||||
"requested_data": json.dumps({"cycles_list": issues}),
|
"requested_data": json.dumps({"modules_list": issues}),
|
||||||
"actor_id": str(self.request.user.id),
|
"actor_id": str(self.request.user.id),
|
||||||
"issue_id": str(self.kwargs.get("pk", None)),
|
"issue_id": str(self.kwargs.get("pk", None)),
|
||||||
"project_id": str(self.kwargs.get("project_id", None)),
|
"project_id": str(self.kwargs.get("project_id", None)),
|
||||||
"current_instance": json.dumps(
|
"current_instance": json.dumps(
|
||||||
{
|
{
|
||||||
"updated_cycle_issues": update_module_issue_activity,
|
"updated_module_issues": update_module_issue_activity,
|
||||||
"created_cycle_issues": serializers.serialize(
|
"created_module_issues": serializers.serialize(
|
||||||
"json", record_to_create
|
"json", record_to_create
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user