π₯π₯π₯ Open-source Jira, Linear, Monday, and ClickUp alternative. Plane is a modern project management platform to manage tasks, sprints, docs, and triage.
TypeScript boardsbug-trackerdjangodockerganttissue-trackerjirajira-alternativekanbanlinearpostgresqlproduct-managementproject-managementproject-planningpythonreactredistypesciptvitework-management
chore: removed the deleted votes and reaction (#6218)
Bavisetti Narayanec41ae61b4d1
diff --git a/apiserver/plane/space/utils/grouper.py b/apiserver/plane/space/utils/grouper.pyindex 250b54e891..2740588422 100644--- a/apiserver/plane/space/utils/grouper.py+++ b/apiserver/plane/space/utils/grouper.py@@ -91,6 +91,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(@@ -117,13 +118,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(@@ -150,7 +152,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.pyindex a1ab332f91..699253ae52 100644--- a/apiserver/plane/space/views/issue.py+++ b/apiserver/plane/space/views/issue.py@@ -701,6 +701,7 @@ class IssueRetrievePublicEndpoint(BaseAPIView):Case(When(votes__isnull=False,+ votes__deleted_at__isnull=True,then=JSONObject(vote=F("votes__vote"),actor_details=JSONObject(@@ -732,7 +733,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(),),@@ -742,6 +747,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(@@ -775,7 +781,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(),),