[WEB-1145] chore: updated sub issue count in cycles, modules and project (#4328)

* chore: total issue count

* chore: removed the migration file

* fix: issue count

---------

Co-authored-by: Anmol Singh Bhatia <anmolsinghbhatia@plane.so>
This commit is contained in:
Bavisetti Narayan 2024-05-01 18:24:54 +05:30 committed by GitHub
parent eb0877a3c8
commit efa3eda85e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 12 additions and 19 deletions

View file

@ -185,7 +185,6 @@ class ProjectViewSet(WebhookMixin, BaseViewSet):
.annotate(
total_issues=Issue.issue_objects.filter(
project_id=self.kwargs.get("pk"),
parent__isnull=True,
)
.order_by()
.annotate(count=Func(F("id"), function="Count"))
@ -204,7 +203,6 @@ class ProjectViewSet(WebhookMixin, BaseViewSet):
archived_issues=Issue.objects.filter(
project_id=self.kwargs.get("pk"),
archived_at__isnull=False,
parent__isnull=True,
)
.order_by()
.annotate(count=Func(F("id"), function="Count"))
@ -224,7 +222,6 @@ class ProjectViewSet(WebhookMixin, BaseViewSet):
draft_issues=Issue.objects.filter(
project_id=self.kwargs.get("pk"),
is_draft=True,
parent__isnull=True,
)
.order_by()
.annotate(count=Func(F("id"), function="Count"))