diff --git a/apiserver/plane/api/serializers/issue.py b/apiserver/plane/api/serializers/issue.py index ecbb1ca46..770880ef0 100644 --- a/apiserver/plane/api/serializers/issue.py +++ b/apiserver/plane/api/serializers/issue.py @@ -291,7 +291,8 @@ class IssueCreateSerializer(BaseSerializer): class IssueActivitySerializer(BaseSerializer): actor_detail = UserLiteSerializer(read_only=True, source="actor") - workspace_detail = WorkspaceLiteSerializer(read_only=True, source="workspace") + issue_detail = IssueFlatSerializer(read_only=True, source="issue") + project_detail = ProjectLiteSerializer(read_only=True, source="project") class Meta: model = IssueActivity diff --git a/apiserver/plane/api/views/issue.py b/apiserver/plane/api/views/issue.py index 38d90ecf9..9369ccf2b 100644 --- a/apiserver/plane/api/views/issue.py +++ b/apiserver/plane/api/views/issue.py @@ -477,7 +477,7 @@ class IssueActivityEndpoint(BaseAPIView): ~Q(field="comment"), project__project_projectmember__member=self.request.user, ) - .select_related("actor", "workspace") + .select_related("actor", "workspace", "issue", "project") ).order_by("created_at") issue_comments = ( IssueComment.objects.filter(issue_id=issue_id) diff --git a/apiserver/plane/api/views/people.py b/apiserver/plane/api/views/people.py index 705f5c96e..84ee47e42 100644 --- a/apiserver/plane/api/views/people.py +++ b/apiserver/plane/api/views/people.py @@ -140,7 +140,7 @@ class UserActivityEndpoint(BaseAPIView, BasePaginator): def get(self, request): try: queryset = IssueActivity.objects.filter(actor=request.user).select_related( - "actor", "workspace" + "actor", "workspace", "issue", "project" ) return self.paginate( diff --git a/apiserver/plane/api/views/project.py b/apiserver/plane/api/views/project.py index dfeab07cc..0589f4a61 100644 --- a/apiserver/plane/api/views/project.py +++ b/apiserver/plane/api/views/project.py @@ -267,7 +267,7 @@ class ProjectViewSet(BaseViewSet): status=status.HTTP_410_GONE, ) except Exception as e: - pr(e) + capture_exception(e) return Response( {"error": "Something went wrong please try again later"}, status=status.HTTP_400_BAD_REQUEST, diff --git a/apiserver/plane/api/views/workspace.py b/apiserver/plane/api/views/workspace.py index 51db47c3d..b195cedb1 100644 --- a/apiserver/plane/api/views/workspace.py +++ b/apiserver/plane/api/views/workspace.py @@ -1190,7 +1190,7 @@ class WorkspaceUserActivityEndpoint(BaseAPIView): workspace__slug=slug, project__project_projectmember__member=request.user, actor=user_id, - ).select_related("actor", "workspace") + ).select_related("actor", "workspace", "issue", "project") if projects: queryset = queryset.filter(project__in=projects)