forked from github/plane
chore: user first name and last name for default analytics (#1054)
This commit is contained in:
parent
84a0f6f77e
commit
c060f7db30
@ -237,21 +237,21 @@ class DefaultAnalyticsEndpoint(BaseAPIView):
|
|||||||
)
|
)
|
||||||
most_issue_created_user = (
|
most_issue_created_user = (
|
||||||
queryset.exclude(created_by=None)
|
queryset.exclude(created_by=None)
|
||||||
.values("created_by__email", "created_by__avatar")
|
.values("created_by__first_name", "created_by__last_name", "created_by__avatar")
|
||||||
.annotate(count=Count("id"))
|
.annotate(count=Count("id"))
|
||||||
.order_by("-count")
|
.order_by("-count")
|
||||||
)[:5]
|
)[:5]
|
||||||
|
|
||||||
most_issue_closed_user = (
|
most_issue_closed_user = (
|
||||||
queryset.filter(completed_at__isnull=False, assignees__isnull=False)
|
queryset.filter(completed_at__isnull=False, assignees__isnull=False)
|
||||||
.values("assignees__email", "assignees__avatar")
|
.values("assignees__first_name", "assignees__last_name", "assignees__avatar")
|
||||||
.annotate(count=Count("id"))
|
.annotate(count=Count("id"))
|
||||||
.order_by("-count")
|
.order_by("-count")
|
||||||
)[:5]
|
)[:5]
|
||||||
|
|
||||||
pending_issue_user = (
|
pending_issue_user = (
|
||||||
queryset.filter(completed_at__isnull=True)
|
queryset.filter(completed_at__isnull=True)
|
||||||
.values("assignees__email", "assignees__avatar")
|
.values("assignees__first_name", "assignees__last_name", "assignees__avatar")
|
||||||
.annotate(count=Count("id"))
|
.annotate(count=Count("id"))
|
||||||
.order_by("-count")
|
.order_by("-count")
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user