Skip to content

Commit

Permalink
chore: cycle endpoint to return display name as well in the assignee …
Browse files Browse the repository at this point in the history
…distribution (#2041)

* chore: cycle endpoint to return display name as well in the assignee distribution

* fix: value error
pablohashescobar authored Sep 1, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent eab1d93 commit 3a0d96a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions apiserver/plane/api/views/cycle.py
Original file line number Diff line number Diff line change
@@ -191,11 +191,10 @@ def list(self, request, slug, project_id):
workspace__slug=slug,
project_id=project_id,
)
.annotate(first_name=F("assignees__first_name"))
.annotate(last_name=F("assignees__last_name"))
.annotate(display_name=F("assignees__display_name"))
.annotate(assignee_id=F("assignees__id"))
.annotate(avatar=F("assignees__avatar"))
.values("first_name", "last_name", "assignee_id", "avatar")
.values("display_name", "assignee_id", "avatar")
.annotate(total_issues=Count("assignee_id"))
.annotate(
completed_issues=Count(
@@ -209,7 +208,7 @@ def list(self, request, slug, project_id):
filter=Q(completed_at__isnull=True),
)
)
.order_by("first_name", "last_name")
.order_by("display_name")
)

label_distribution = (

1 comment on commit 3a0d96a

@vercel
Copy link

@vercel vercel bot commented on 3a0d96a Sep 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

plane-dev – ./apps/app

plane-dev.vercel.app
plane-dev-plane.vercel.app
plane-dev-git-develop-plane.vercel.app

Please sign in to comment.