Skip to content
Merged
3 changes: 2 additions & 1 deletion apiserver/plane/api/serializers/issue.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,8 @@ def update(self, instance, validated_data):

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
Expand Down
2 changes: 1 addition & 1 deletion apiserver/plane/api/views/issue.py
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ def get(self, request, slug, project_id, issue_id):
~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)
Expand Down
2 changes: 1 addition & 1 deletion apiserver/plane/api/views/people.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion apiserver/plane/api/views/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ def create(self, request, slug):
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,
Expand Down
2 changes: 1 addition & 1 deletion apiserver/plane/api/views/workspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -1190,7 +1190,7 @@ def get(self, request, slug, user_id):
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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,5 +67,15 @@ class Migration(migrations.Migration):
'ordering': ('-created_at',),
'unique_together': {('comment', 'actor', 'reaction')},
},
),
migrations.AlterField(
model_name='project',
name='identifier',
field=models.CharField(max_length=12, verbose_name='Project Identifier'),
),
migrations.AlterField(
model_name='projectidentifier',
name='name',
field=models.CharField(max_length=12),
),
]
Loading