Skip to content

Commit

Permalink
chore: active issue total count (#3936)
Browse files Browse the repository at this point in the history
  • Loading branch information
NarayanBavisetti authored Mar 12, 2024
1 parent 2e5e145 commit 578bd29
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion apiserver/plane/app/views/cycle/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,15 @@ def get_queryset(self):
)

def list(self, request, slug, project_id):
queryset = self.get_queryset()
queryset = self.get_queryset().annotate(
total_issues=Count(
"issue_cycle",
filter=Q(
issue_cycle__issue__archived_at__isnull=True,
issue_cycle__issue__is_draft=False,
),
)
)
cycle_view = request.GET.get("cycle_view", "all")

# Update the order by
Expand Down Expand Up @@ -223,6 +231,7 @@ def list(self, request, slug, project_id):
"progress_snapshot",
# meta fields
"is_favorite",
"total_issues",
"cancelled_issues",
"completed_issues",
"started_issues",
Expand Down

0 comments on commit 578bd29

Please sign in to comment.