SubTasks
To Create, update, delete, and query from SubTasks table.
Table Specific Information
Select
The connector will use the Asana API to process WHERE clause conditions built with the following column and operator. The rest of the filter is executed client side within the connector.
- ParentTaskId supports the '=' comparison.
For example, the following query is processed on server side and it is a required filter:
SELECT * FROM SubTasks WHERE ParentTaskId = '1127092449876457'
A simple SELECT query will only return the first level of subtasks.
SELECT * FROM SubTasks
There may be up to five levels of subtasks below a task. (Note, Asana does not recommend using sub-subtasks).
If additional levels of subtasks are needed, a subquery can be used:
SELECT * FROM SubTasks WHERE ParentTaskId IN (SELECT Id FROM SubTasks)
When executing a query without a ParentTaskId filter, due to the Asana API design, subtasks are only retrieved on a per task basis. The connector will first query the
workspace to retrieve a list of projects. A separate request will then be made for each project to retrieve all the applicable tasks. Another request will be made for
each task to retrieve any subtasks associated with the task. In theory, this is similar to executing the following query:
SELECT * FROM SubTasks WHERE ParentTaskId IN (SELECT Id FROM Tasks WHERE ProjectId IN (SELECT Id FROM Projects))Due to the number of required requests, performance may be impacted.
Insert
ParentTaskId is a mandatory column for inserting into Projects table. For example:
INSERT INTO SubTasks (ParentTaskId, Name, Assignee, AssigneeStatus, startOn, DueOn, Completed, ProjectId, Notes, ApprovalStatus, Followers) VALUES ('1167713816822372', 'subtask1', '1167715005778471', 'later', '2020-03-25', '2020-04-01', false, 1167713816822364, 'SubTask Notes', 'changes_requested', '1167715005778471')
Inserting multiple Followers into SubTasks table. For example:
INSERT INTO SubTasks (ParentTaskId, Followers) VALUES ('1167713816822372', '1206414724399714,1207035318501516' )
Columns
Name | Type | ReadOnly | References | Description |
Id [KEY] | String | True |
Globally unique ID of the Subtask. | |
ParentTaskId | String | True |
Globally unique ID of the task. | |
Name | String | False |
Name of the Subtask. | |
Assignee | String | False |
Users.Id |
User to which this subtask is assigned. |
AssigneeStatus | String | False |
Scheduling status of this subtask for the user it is assigned to. The allowed values are today, upcoming, later, new, inbox. | |
CreatedAt | Datetime | True |
The time at which this subtask was created. | |
ModifiedAt | Datetime | True |
The time at which this subtask was last modified. | |
startOn | Date | False |
The day on which work begins for the task , or null if the task has no start date. This takes a date with YYYY-MM-DD format. | |
DueAt | Datetime | False |
Date and time on which this subtask is due, or null if the subtask has no due time. | |
DueOn | Date | False |
Date on which this task is due, or null if the task has no due date. This takes a date with YYYY-MM-DD format. | |
Completed | Boolean | False |
True if the subtask is currently marked complete, false if not. | |
CompletedAt | Datetime | True |
The time at which this subtask was completed, or null if the subtask is incomplete. | |
completed_by | String | True |
Users.Id |
The user who completed this task. |
ProjectId | String | False |
Projects.Id |
Globally unique ID of the Project. |
WorkspaceId | String | False |
Workspaces.Id |
Globally unique ID of the Workspace. |
Notes | String | False |
More detailed, free-form textual information associated with the subtask. | |
ApprovalStatus | String | False |
Reflects the approval status of this task. The allowed values are pending, approved, rejected, changes_requested. | |
ResourceSubType | String | False |
The subtype of this resource. Different subtypes retain many of the same fields and behavior, but may render differently in Asana or represent resources with different semantic meaning. The allowed values are default_task, milestone, section, approval. | |
HtmlNotes | String | False |
The notes of the text with formatting as HTML. | |
Dependencies | String | True |
Array of resources referencing tasks that this task depends on. | |
Memberships | String | True |
Array of projects this task is associated with and the section it is in. | |
Dependents | String | True |
Array of resources referencing tasks that depend on this task. | |
Liked | Boolean | False |
True if the task is liked by the authorized user, false if not. | |
NumberofLikes | Integer | True |
The number of users who have liked this Task. | |
LikedBy | String | True |
Array of likes for users who have liked this task. | |
ResourceType | String | True |
The base type of this resource. | |
IsRenderedAsSeparator | Boolean | True |
In some contexts tasks can be rendered as a visual separator. | |
Followers | String | False |
Array of users following this task. | |
Tags | String | False |
Array of tags associated with this task. |