diff --git a/apiserver/plane/space/utils/grouper.py b/apiserver/plane/space/utils/grouper.py index 920b3645a2..53688ecfa8 100644 --- a/apiserver/plane/space/utils/grouper.py +++ b/apiserver/plane/space/utils/grouper.py @@ -97,6 +97,7 @@ def issue_on_results(issues, group_by, sub_group_by): Case( When( votes__isnull=False, + votes__deleted_at__isnull=True, then=JSONObject( vote=F("votes__vote"), actor_details=JSONObject( @@ -123,13 +124,14 @@ def issue_on_results(issues, group_by, sub_group_by): default=None, output_field=JSONField(), ), - filter=Q(votes__isnull=False), + filter=Q(votes__isnull=False,votes__deleted_at__isnull=True), distinct=True, ), reaction_items=ArrayAgg( Case( When( issue_reactions__isnull=False, + issue_reactions__deleted_at__isnull=True, then=JSONObject( reaction=F("issue_reactions__reaction"), actor_details=JSONObject( @@ -156,7 +158,7 @@ def issue_on_results(issues, group_by, sub_group_by): default=None, output_field=JSONField(), ), - filter=Q(issue_reactions__isnull=False), + filter=Q(issue_reactions__isnull=False, issue_reactions__deleted_at__isnull=True), distinct=True, ), ).values(*required_fields, "vote_items", "reaction_items") diff --git a/apiserver/plane/space/views/issue.py b/apiserver/plane/space/views/issue.py index 236704d400..6ca9927205 100644 --- a/apiserver/plane/space/views/issue.py +++ b/apiserver/plane/space/views/issue.py @@ -805,6 +805,7 @@ class IssueRetrievePublicEndpoint(BaseAPIView): Case( When( votes__isnull=False, + votes__deleted_at__isnull=True, then=JSONObject( vote=F("votes__vote"), actor_details=JSONObject( @@ -836,7 +837,11 @@ class IssueRetrievePublicEndpoint(BaseAPIView): output_field=JSONField(), ), filter=Case( - When(votes__isnull=False, then=True), + When( + votes__isnull=False, + votes__deleted_at__isnull=True, + then=True, + ), default=False, output_field=JSONField(), ), @@ -846,6 +851,7 @@ class IssueRetrievePublicEndpoint(BaseAPIView): Case( When( issue_reactions__isnull=False, + issue_reactions__deleted_at__isnull=True, then=JSONObject( reaction=F("issue_reactions__reaction"), actor_details=JSONObject( @@ -879,7 +885,11 @@ class IssueRetrievePublicEndpoint(BaseAPIView): output_field=JSONField(), ), filter=Case( - When(issue_reactions__isnull=False, then=True), + When( + issue_reactions__isnull=False, + issue_reactions__deleted_at__isnull=True, + then=True, + ), default=False, output_field=JSONField(), ), diff --git a/web/ce/types/projects/index.ts b/web/ce/types/projects/index.ts index 244d8c4df3..9fb35777a3 100644 --- a/web/ce/types/projects/index.ts +++ b/web/ce/types/projects/index.ts @@ -1 +1,2 @@ export * from "./projects"; +export * from "./project-activity"; diff --git a/web/ce/types/projects/project-activity.ts b/web/ce/types/projects/project-activity.ts new file mode 100644 index 0000000000..ed75a6b9c8 --- /dev/null +++ b/web/ce/types/projects/project-activity.ts @@ -0,0 +1,25 @@ +export interface TProjectActivity { + id: string; + content: string; + createdAt: string; + updatedAt: string; + userId: string; + projectId: string; + created_at: string; + field: string; + verb: string; + actor_detail: { + display_name: string; + id: string; + }; + workspace_detail: { + slug: string; + }; + project_detail: { + name: string; + }; + new_value: string; + old_value: string; + project: string; + new_identifier?: string; +}