Skip to main content

addChild

plugin.tasksApi.addChild(taskId: string, data: CreateTaskRequest): Promise<Task>

Adds a child task to an existing parent task.

Creates a new task as a child of the specified parent task, establishing a hierarchical relationship. Child tasks represent subtasks or components that contribute to completing the parent task. Returns the new child task.

Parameters

ParameterTypeRequiredDescription
taskIdstringYesThe unique identifier of the parent task
dataCreateTaskRequestYesThe child task creation request

Returns

Promise<Task> — A promise that resolves to the newly created child Task object

Example

import plugin from '@codebolt/plugin-sdk';

const result = await plugin.tasksApi.addChild('taskId', /* CreateTaskRequest */);
console.log(result);