Skip to content

POST /tasks/{id}/move with section_id silently strips parent_id from subtasks #258

Description

@KalebCole

Description

When moving a subtask to a section via POST /api/v1/tasks/{task_id}/move with {"section_id": "..."}, the API silently clears the task's parent_id, promoting the subtask to a top-level task. The response returns 200 with no warning that the parent relationship was removed.

Steps to reproduce

  1. Create a parent task and a subtask under it (parent_id set).
  2. Call POST /api/v1/tasks/{subtask_id}/move with body {"section_id": "<section_id>"}.
  3. Fetch the task again: parent_id is now null.

Expected behavior

Moving a subtask between sections should preserve its parent_id, or the API should return an error/warning if detaching the parent is intentional.

Actual behavior

The subtask is silently detached and becomes a top-level task in the target section.

Additional context

  • Moving with {"parent_id": "<parent_id>"} on the same endpoint does re-attach the task, so the move endpoint clearly understands parentage. Only the section_id variant drops it.
  • The task update endpoint (POST /api/v1/tasks/{task_id}) rejects parent_id as an unsupported field, so the move endpoint is currently the only way to restore the relationship after it is lost.
  • Observed against REST API v1 on 2026-09-22.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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