Set task parent
set_task_parentMove a task within its project's work breakdown structure — indent it under another task, or pass wbsParentId=null to lift it back to the top level. Requires Administrator or ProjectManager role. WORK BREAKDOWN STRUCTURE. Tasks nest via wbsParentId, and every task carries a read-only wbscode — its dotted outline number within the project ("1", "2.3", "2.3.1") — plus issummary. wbsParentId is NOT a scheduling dependency: a WBS child sits INSIDE its parent's span and in fact defines it, whereas a predecessor runs BEFORE its successor. Predecessors are their own resource — create_task_dependency — and are unrelated to nesting. A task with at least one WBS child is a SUMMARY TASK and owns none of its own schedule: its startDate, endDate, duration, percentComplete and status are all recomputed from its children (dates span the children; progress is their span-weighted average). Writing any of those on a summary returns 422 — change the children instead. wbscode is derived from tree position, so it shifts whenever tasks are reordered or re-parented: display it, never store or match on it. The new parent must be in the same project, must not be a milestone, and must not be one of this task's own descendants (no cycles); nesting is capped at 10 levels, measured against the deepest leaf of the subtree being moved. Indenting a task under a leaf turns that leaf into a summary task, replacing its hand-entered schedule with the roll-up of its new children. The server also renumbers the whole project's display order and outline codes, so re-read the project afterwards rather than assuming other tasks are unchanged. Returns the project's tasks in their new order.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Task id to move | |
| wbsParentId | No | New WBS parent task id, or null to make this a top-level task |