Project.defaultIssueStatus is declared as Ref<IssueStatus> (required) in plugins/tracker/src/index.ts#L64, but is undefined at runtime on Huly >=0.7.x for projects created without an explicit default status selection (workspace templates, CreateProject UI with no selection stores "").
Evidence
- UI already handles this:
StatusEditor.svelte#L107-L117 checks if (defaultIssueStatus !== undefined) and falls back to statuses?.[0].
CreateProject.svelte#L114 sets defaultIssueStatus: defaultStatus ?? ('' as Ref<IssueStatus>) — empty string when user doesn't pick one.
- REST API consumers (e.g. MCP servers using
@hcengineering/api-client) receive undefined for this field, causing silent failures when creating issues with the "project default" status.
- Example of API consumers having to fix this on their side: dearlordylord/huly-mcp@f52cd84
Affected call sites
These access .defaultIssueStatus without guarding for undefined:
Proposed fix
Make the field optional in the interface and model class:
// plugins/tracker/src/index.ts
- defaultIssueStatus: Ref<IssueStatus>
+ defaultIssueStatus?: Ref<IssueStatus>
// models/tracker/src/types.ts
- defaultIssueStatus!: Ref<IssueStatus>
+ defaultIssueStatus?: Ref<IssueStatus>
fixed by #10598
Project.defaultIssueStatusis declared asRef<IssueStatus>(required) inplugins/tracker/src/index.ts#L64, but isundefinedat runtime on Huly >=0.7.x for projects created without an explicit default status selection (workspace templates,CreateProjectUI with no selection stores"").Evidence
StatusEditor.svelte#L107-L117checksif (defaultIssueStatus !== undefined)and falls back tostatuses?.[0].CreateProject.svelte#L114setsdefaultIssueStatus: defaultStatus ?? ('' as Ref<IssueStatus>)— empty string when user doesn't pick one.@hcengineering/api-client) receiveundefinedfor this field, causing silent failures when creating issues with the "project default" status.Affected call sites
These access
.defaultIssueStatuswithout guarding forundefined:SubIssues.svelte#L51,#L79DraftIssueChildEditor.svelte#L72,#L87migration.ts#L203CreateVacancy.svelte#L188Proposed fix
Make the field optional in the interface and model class:
fixed by #10598