fix: created_by notifications (#1534)
* chore: add triggered by details for notifications * dev: update issue activity json to include extra fields * dev: remove unused imports and improve the filtering * dev: fix unread filter * dev: fix created_by none when updating the field
This commit is contained in:
parent
0a56a30ab2
commit
090870b03e
5 changed files with 10 additions and 6 deletions
|
|
@ -45,7 +45,6 @@ from plane.api.serializers import (
|
|||
IssueLiteSerializer,
|
||||
IssueAttachmentSerializer,
|
||||
IssueSubscriberSerializer,
|
||||
ProjectMemberSerializer,
|
||||
ProjectMemberLiteSerializer,
|
||||
)
|
||||
from plane.api.permissions import (
|
||||
|
|
|
|||
|
|
@ -216,6 +216,7 @@ class UnreadNotificationEndpoint(BaseAPIView):
|
|||
watching_notification_count = Notification.objects.filter(
|
||||
workspace__slug=slug,
|
||||
receiver_id=request.user.id,
|
||||
read_at__isnull=True,
|
||||
entity_identifier__in=IssueSubscriber.objects.filter(
|
||||
workspace__slug=slug, subscriber_id=request.user.id
|
||||
).values_list("issue_id", flat=True),
|
||||
|
|
@ -225,6 +226,7 @@ class UnreadNotificationEndpoint(BaseAPIView):
|
|||
my_issues_count = Notification.objects.filter(
|
||||
workspace__slug=slug,
|
||||
receiver_id=request.user.id,
|
||||
read_at__isnull=True,
|
||||
entity_identifier__in=IssueAssignee.objects.filter(
|
||||
workspace__slug=slug, assignee_id=request.user.id
|
||||
).values_list("issue_id", flat=True),
|
||||
|
|
@ -234,6 +236,7 @@ class UnreadNotificationEndpoint(BaseAPIView):
|
|||
created_issues_count = Notification.objects.filter(
|
||||
workspace__slug=slug,
|
||||
receiver_id=request.user.id,
|
||||
read_at__isnull=True,
|
||||
entity_identifier__in=Issue.objects.filter(
|
||||
workspace__slug=slug, created_by=request.user
|
||||
).values_list("pk", flat=True),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue