chore: create activity when a block is converter into an issue (#609)
This commit is contained in:
parent
1d7b65ad83
commit
f79fdbf782
1 changed files with 10 additions and 0 deletions
|
|
@ -21,6 +21,7 @@ from plane.db.models import (
|
|||
PageFavorite,
|
||||
Issue,
|
||||
IssueAssignee,
|
||||
IssueActivity,
|
||||
)
|
||||
from plane.api.serializers import (
|
||||
PageSerializer,
|
||||
|
|
@ -213,6 +214,15 @@ class CreateIssueFromPageBlockEndpoint(BaseAPIView):
|
|||
_ = IssueAssignee.objects.create(
|
||||
issue=issue, assignee=request.user, project_id=project_id
|
||||
)
|
||||
|
||||
_ = IssueActivity.objects.create(
|
||||
issue=issue,
|
||||
actor=request.user,
|
||||
project_id=project_id,
|
||||
comment=f"{request.user.email} created the issue from {page_block.name} block",
|
||||
verb="created",
|
||||
)
|
||||
|
||||
page_block.issue = issue
|
||||
page_block.save()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue