TaskMethods
Methods¶
assign()¶
assign(
options:TaskAssignOptions):Promise<OperationResponse<TaskAssignmentOptions[] |TaskAssignmentResponse[]>>
Assigns this task to a user or users
Parameters¶
| Parameter | Type | Description |
|---|---|---|
options |
TaskAssignOptions |
Assignment options (requires at least one of: userId, userNameOrEmail) |
Returns¶
Promise<OperationResponse<TaskAssignmentOptions[] | TaskAssignmentResponse[]>>
Promise resolving to task assignment results
complete()¶
complete(
options:TaskCompleteOptions):Promise<OperationResponse<TaskCompletionOptions>>
Completes this task with optional data and action
Parameters¶
| Parameter | Type | Description |
|---|---|---|
options |
TaskCompleteOptions |
Completion options |
Returns¶
Promise<OperationResponse<TaskCompletionOptions>>
Promise resolving to completion result
createComment()¶
createComment(
text:string,options?:FolderScopedOptions):Promise<TaskCommentGetResponse>
Creates a comment on this task.
Parameters¶
| Parameter | Type | Description |
|---|---|---|
text |
string |
Comment text (max 512 characters) |
options? |
FolderScopedOptions |
Optional folder scope override (defaults to this task's folder) |
Returns¶
Promise<TaskCommentGetResponse>
Promise resolving to the created comment TaskCommentGetResponse
editMetadata()¶
editMetadata(
options?:TaskEditMetadataOptions):Promise<void>
Edits this task's metadata (title, priority, catalog association, etc.).
Parameters¶
| Parameter | Type | Description |
|---|---|---|
options? |
TaskEditMetadataOptions |
Fields to change plus optional folder scope override (defaults to this task's folder) |
Returns¶
Promise<void>
Promise resolving once the edit completes
getComments()¶
getComments<
T>(options?:T):Promise<TextendsHasPaginationOptions<T> ?PaginatedResponse<TaskCommentGetResponse> :NonPaginatedResponse<TaskCommentGetResponse>>
Gets the comments on this task.
Type Parameters¶
| Type Parameter | Default type |
|---|---|
T extends TaskCommentGetByTaskIdOptions |
TaskCommentGetByTaskIdOptions |
Parameters¶
| Parameter | Type | Description |
|---|---|---|
options? |
T |
Optional folder scope override (defaults to this task's folder) plus query and pagination options |
Returns¶
Promise<T extends HasPaginationOptions<T> ? PaginatedResponse<TaskCommentGetResponse> : NonPaginatedResponse<TaskCommentGetResponse>>
Promise resolving to either a NonPaginatedResponse or PaginatedResponse of TaskCommentGetResponse items, paginated when pagination options are used.
reassign()¶
reassign(
options:TaskAssignOptions):Promise<OperationResponse<TaskAssignmentOptions[] |TaskAssignmentResponse[]>>
Reassigns this task to a new user
Parameters¶
| Parameter | Type | Description |
|---|---|---|
options |
TaskAssignOptions |
Assignment options (requires at least one of: userId, userNameOrEmail) |
Returns¶
Promise<OperationResponse<TaskAssignmentOptions[] | TaskAssignmentResponse[]>>
Promise resolving to task assignment results
saveData()¶
saveData(
data:Record<string,unknown>,options?:FolderScopedOptions):Promise<void>
Saves this task's data (form/task payload), replacing the existing payload.
Parameters¶
| Parameter | Type | Description |
|---|---|---|
data |
Record<string, unknown> |
The task data to save |
options? |
FolderScopedOptions |
Optional folder scope override (defaults to this task's folder) |
Returns¶
Promise<void>
Promise resolving once the save completes
saveTags()¶
saveTags(
tags:Tag[],options?:FolderScopedOptions):Promise<void>
Saves the tags on this task, replacing any existing tags.
Parameters¶
| Parameter | Type | Description |
|---|---|---|
tags |
Tag[] |
The tags to set |
options? |
FolderScopedOptions |
Optional folder scope override (defaults to this task's folder) |
Returns¶
Promise<void>
Promise resolving once the save completes
unassign()¶
unassign():
Promise<OperationResponse<TaskAssignmentResponse[] | {taskId:number; }[]>>
Unassigns this task (removes current assignee)
Returns¶
Promise<OperationResponse<TaskAssignmentResponse[] | { taskId: number; }[]>>
Promise resolving to task assignment results