Skip to content

POST /api/v1/tasks with projectId does not update section items` array #260

@dojoca

Description

@dojoca

Description

When creating a task via the API with a valid projectId, the task is stored correctly and appears in "All Tasks" and other global views. However, the task does not appear in the project view because the corresponding section's items array is never updated.

Steps to Reproduce

  1. Create a project via the UI (e.g. "My Project") and note its ID
  2. POST a task to /api/v1/tasks with the project's ID:
{
  "id": "some-uuid",
  "title": "Test task",
  "completed": false,
  "priority": 4,
  "projectId": "your-project-id",
  "labels": [],
  "subtasks": [],
  "comments": [],
  "createdAt": "2026-03-05T00:00:00.000Z",
  "recurringMode": "dueDate"
}
  1. Navigate to the project in the UI
  2. Task does not appear under the project's Default section

Expected Behaviour

Task should appear in the project view under the default section, consistent with tasks created via the UI.

Actual Behaviour

Task appears in "All Tasks" with projectId correctly set, but sections[].items in data.json remains empty:

"sections": [
  {
    "id": "00000000-0000-0000-0000-000000000000",
    "name": "Default",
    "items": [],
    "isDefault": true
  }
]

Tasks created via the UI correctly populate items with the task ID. The API does not.

Workaround

Manually update data.json to append the task ID into the relevant section's items array, then restart the container.

Environment

  • TaskTrove version: v0.12.0
  • Deployment: Docker (self-hosted)
  • API version: v1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions