mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
chore: total issue count
This commit is contained in:
parent
12b4f74e1d
commit
5436b489ab
@ -185,7 +185,6 @@ class ProjectViewSet(WebhookMixin, BaseViewSet):
|
|||||||
.annotate(
|
.annotate(
|
||||||
total_issues=Issue.issue_objects.filter(
|
total_issues=Issue.issue_objects.filter(
|
||||||
project_id=self.kwargs.get("pk"),
|
project_id=self.kwargs.get("pk"),
|
||||||
parent__isnull=True,
|
|
||||||
)
|
)
|
||||||
.order_by()
|
.order_by()
|
||||||
.annotate(count=Func(F("id"), function="Count"))
|
.annotate(count=Func(F("id"), function="Count"))
|
||||||
@ -194,7 +193,6 @@ class ProjectViewSet(WebhookMixin, BaseViewSet):
|
|||||||
.annotate(
|
.annotate(
|
||||||
sub_issues=Issue.issue_objects.filter(
|
sub_issues=Issue.issue_objects.filter(
|
||||||
project_id=self.kwargs.get("pk"),
|
project_id=self.kwargs.get("pk"),
|
||||||
parent__isnull=False,
|
|
||||||
)
|
)
|
||||||
.order_by()
|
.order_by()
|
||||||
.annotate(count=Func(F("id"), function="Count"))
|
.annotate(count=Func(F("id"), function="Count"))
|
||||||
@ -204,7 +202,6 @@ class ProjectViewSet(WebhookMixin, BaseViewSet):
|
|||||||
archived_issues=Issue.objects.filter(
|
archived_issues=Issue.objects.filter(
|
||||||
project_id=self.kwargs.get("pk"),
|
project_id=self.kwargs.get("pk"),
|
||||||
archived_at__isnull=False,
|
archived_at__isnull=False,
|
||||||
parent__isnull=True,
|
|
||||||
)
|
)
|
||||||
.order_by()
|
.order_by()
|
||||||
.annotate(count=Func(F("id"), function="Count"))
|
.annotate(count=Func(F("id"), function="Count"))
|
||||||
@ -214,7 +211,6 @@ class ProjectViewSet(WebhookMixin, BaseViewSet):
|
|||||||
archived_sub_issues=Issue.objects.filter(
|
archived_sub_issues=Issue.objects.filter(
|
||||||
project_id=self.kwargs.get("pk"),
|
project_id=self.kwargs.get("pk"),
|
||||||
archived_at__isnull=False,
|
archived_at__isnull=False,
|
||||||
parent__isnull=False,
|
|
||||||
)
|
)
|
||||||
.order_by()
|
.order_by()
|
||||||
.annotate(count=Func(F("id"), function="Count"))
|
.annotate(count=Func(F("id"), function="Count"))
|
||||||
@ -224,7 +220,6 @@ class ProjectViewSet(WebhookMixin, BaseViewSet):
|
|||||||
draft_issues=Issue.objects.filter(
|
draft_issues=Issue.objects.filter(
|
||||||
project_id=self.kwargs.get("pk"),
|
project_id=self.kwargs.get("pk"),
|
||||||
is_draft=True,
|
is_draft=True,
|
||||||
parent__isnull=True,
|
|
||||||
)
|
)
|
||||||
.order_by()
|
.order_by()
|
||||||
.annotate(count=Func(F("id"), function="Count"))
|
.annotate(count=Func(F("id"), function="Count"))
|
||||||
@ -234,7 +229,6 @@ class ProjectViewSet(WebhookMixin, BaseViewSet):
|
|||||||
draft_sub_issues=Issue.objects.filter(
|
draft_sub_issues=Issue.objects.filter(
|
||||||
project_id=self.kwargs.get("pk"),
|
project_id=self.kwargs.get("pk"),
|
||||||
is_draft=True,
|
is_draft=True,
|
||||||
parent__isnull=False,
|
|
||||||
)
|
)
|
||||||
.order_by()
|
.order_by()
|
||||||
.annotate(count=Func(F("id"), function="Count"))
|
.annotate(count=Func(F("id"), function="Count"))
|
||||||
|
Loading…
Reference in New Issue
Block a user