fix: issues count to remove archived issues (#1591)

This commit is contained in:
Nikhil 2023-07-20 16:58:34 +05:30 committed by GitHub
parent 05df65577a
commit 9b6721790f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -214,6 +214,7 @@ class UnreadNotificationEndpoint(BaseAPIView):
workspace__slug=slug, workspace__slug=slug,
receiver_id=request.user.id, receiver_id=request.user.id,
read_at__isnull=True, read_at__isnull=True,
archived_at__isnull=True,
entity_identifier__in=IssueSubscriber.objects.filter( entity_identifier__in=IssueSubscriber.objects.filter(
workspace__slug=slug, subscriber_id=request.user.id workspace__slug=slug, subscriber_id=request.user.id
).values_list("issue_id", flat=True), ).values_list("issue_id", flat=True),
@ -224,6 +225,7 @@ class UnreadNotificationEndpoint(BaseAPIView):
workspace__slug=slug, workspace__slug=slug,
receiver_id=request.user.id, receiver_id=request.user.id,
read_at__isnull=True, read_at__isnull=True,
archived_at__isnull=True,
entity_identifier__in=IssueAssignee.objects.filter( entity_identifier__in=IssueAssignee.objects.filter(
workspace__slug=slug, assignee_id=request.user.id workspace__slug=slug, assignee_id=request.user.id
).values_list("issue_id", flat=True), ).values_list("issue_id", flat=True),
@ -234,6 +236,7 @@ class UnreadNotificationEndpoint(BaseAPIView):
workspace__slug=slug, workspace__slug=slug,
receiver_id=request.user.id, receiver_id=request.user.id,
read_at__isnull=True, read_at__isnull=True,
archived_at__isnull=True,
entity_identifier__in=Issue.objects.filter( entity_identifier__in=Issue.objects.filter(
workspace__slug=slug, created_by=request.user workspace__slug=slug, created_by=request.user
).values_list("pk", flat=True), ).values_list("pk", flat=True),