Skip to content

bug(projects): statusFieldId not validated in factory, silent runtime failure #847

@willgriffin

Description

@willgriffin

Problem

getProject() factory accepts statusFieldId and statusOptions as optional config, but updateItemStatus() throws INVALID_STATUS at runtime if they're missing. No upfront validation.

Additionally:

  • ProjectItem.fields is always empty despite type definition promising field data
  • updateItemField() is hardcoded to single-select fields only — no warning for text/number/date types
  • Config discovery (project ID, field ID, option IDs) requires manual GraphQL queries with no helper

Expected

Factory should validate required fields when status-related methods will be used, or at minimum document the requirement clearly.

Found during

CLAUDE.md audit — packages/projects/src/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions