Skip to content

armgit / plane

Public Imported from GitHub
0

πŸ”₯πŸ”₯πŸ”₯ Open-source Jira, Linear, Monday, and ClickUp alternative. Plane is a modern project management platform to manage tasks, sprints, docs, and triage.

[WEB-4359] fix: application crash when creating work item via quick add (#7245)

Prateek Shouryaf26b4d3d068a
diff --git a/packages/utils/src/work-item/base.ts b/packages/utils/src/work-item/base.ts
index 6a70689287..7ebca1ffd1 100644
--- a/packages/utils/src/work-item/base.ts
+++ b/packages/utils/src/work-item/base.ts
@@ -146,6 +146,11 @@ export const createIssuePayload: (projectId: string, formData: Partial<TIssue>)
id: uuidv4(),
project_id: projectId,
priority: "none",
+ label_ids: [],
+ assignee_ids: [],
+ sub_issues_count: 0,
+ attachment_count: 0,
+ link_count: 0,
// tempId is used for optimistic updates. It is not a part of the API response.
tempId: uuidv4(),
// to be overridden by the form data
diff --git a/web/core/components/issues/issue-layouts/properties/all-properties.tsx b/web/core/components/issues/issue-layouts/properties/all-properties.tsx
index 877aa85d93..3b7e5c90bd 100644
--- a/web/core/components/issues/issue-layouts/properties/all-properties.tsx
+++ b/web/core/components/issues/issue-layouts/properties/all-properties.tsx
@@ -503,7 +503,7 @@ export const IssueProperties: React.FC<IIssueProperties> = observer((props) => {
<WithDisplayPropertiesHOC displayProperties={displayProperties} displayPropertyKey="labels">
<IssuePropertyLabels
projectId={issue?.project_id || null}
- value={issue?.label_ids || null}
+ value={issue?.label_ids || []}
defaultOptions={defaultLabelOptions}
onChange={handleLabel}
disabled={isReadOnly}