mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
chore: link and attachment count in sub issues (#1352)
This commit is contained in:
parent
352c84b026
commit
537cd2f5dd
@ -590,6 +590,20 @@ class SubIssuesEndpoint(BaseAPIView):
|
||||
.annotate(count=Func(F("id"), function="Count"))
|
||||
.values("count")
|
||||
)
|
||||
.annotate(
|
||||
link_count=IssueLink.objects.filter(issue=OuterRef("id"))
|
||||
.order_by()
|
||||
.annotate(count=Func(F("id"), function="Count"))
|
||||
.values("count")
|
||||
)
|
||||
.annotate(
|
||||
attachment_count=IssueAttachment.objects.filter(
|
||||
issue=OuterRef("id")
|
||||
)
|
||||
.order_by()
|
||||
.annotate(count=Func(F("id"), function="Count"))
|
||||
.values("count")
|
||||
)
|
||||
)
|
||||
|
||||
state_distribution = (
|
||||
|
Loading…
Reference in New Issue
Block a user