chore: updated the key description to description_html in issue create and update (#1089)

This commit is contained in:
guru_sainath
2024-09-11 20:03:21 +05:30
committed by GitHub
parent 7a1872be95
commit 0224b2bea6
2 changed files with 19 additions and 20 deletions

View File

@@ -39,14 +39,14 @@ class IssueMutation:
async def createIssue(
self,
info: Info,
name: str,
project: str,
state: str,
slug: str,
project: str,
name: str,
state: str,
priority: str,
labels: Optional[list[strawberry.ID]] = None,
assignees: Optional[list[strawberry.ID]] = None,
description: Optional[str] = {},
descriptionHtml: Optional[str] = {},
parent: Optional[str] = None,
estimatePoint: Optional[str] = None,
startDate: Optional[datetime] = None,
@@ -58,7 +58,7 @@ class IssueMutation:
project_id=project,
priority=priority,
state_id=state,
description=description,
description_html=descriptionHtml,
parent_id=parent,
estimate_point_id=estimatePoint,
start_date=startDate,
@@ -131,7 +131,7 @@ class IssueMutation:
priority: Optional[str] = None,
labels: Optional[list[strawberry.ID]] = None,
assignees: Optional[list[strawberry.ID]] = None,
description: Optional[str] = None,
descriptionHtml: Optional[str] = None,
parent: Optional[str] = None,
estimatePoint: Optional[str] = None,
startDate: Optional[datetime] = None,
@@ -145,8 +145,8 @@ class IssueMutation:
issue.priority = priority
if state is not None:
issue.state_id = state
if description is not None:
issue.description = description
if descriptionHtml is not None:
issue.description_html = descriptionHtml
if parent is not None:
issue.parent_id = parent
if estimatePoint is not None:
@@ -262,24 +262,23 @@ class IssueUserPropertyMutation:
@strawberry.type
class IssueAttachmentMutation:
# @strawberry.mutation(
# extensions=[PermissionExtension(permissions=[ProjectBasePermission()])]
# )
# def upload_file(self, file: Upload, info: Info) -> bool:
# content = file.read()
# filename = file.filename
# @strawberry.mutation(
# extensions=[PermissionExtension(permissions=[ProjectBasePermission()])]
# )
# async def upload_file(self, file: Upload, info: Info) -> bool:
# content = await sync_to_async(file.read)()
# filename = file.filename
# @strawberry.mutation(
# extensions=[PermissionExtension(permissions=[ProjectBasePermission()])]
# )
# async def upload_file(self, file: Upload, info: Info) -> bool:
# content = await sync_to_async(file.read)()
# filename = file.filename
# # Save the file using Django's file storage
# await sync_to_async(default_storage.save)(filename, content)
# # Save the file using Django's file storage
# await sync_to_async(default_storage.save)(filename, content)
# return True
# return True
@strawberry.mutation(
extensions=[PermissionExtension(permissions=[ProjectBasePermission()])]

View File

@@ -175,7 +175,7 @@ class IssueQuery:
project: strawberry.ID,
issue: strawberry.ID,
) -> IssuesType:
issue = await sync_to_async(Issue.issue_objects.get)(
issue_detail = await sync_to_async(Issue.issue_objects.get)(
workspace__slug=slug,
project_id=project,
id=issue,
@@ -192,7 +192,7 @@ class IssueQuery:
entity_name="issue",
entity_identifier=issue,
)
return issue
return issue_detail
@strawberry.type