Task

class Task(parent=None)

Bases: Item

This class describes a Template object child of Item class.

add_timelog(user_key, comment='', date='', duration='')

Add a timelog to the task

Parameters:
  • user_key (string) – The user key

  • comment (string) – The comment

  • date (string ISO 8601 (date)) – The date of the timelog. Use date() to generate an ISO date string.

  • duration (string ISO 8601 (duration)) – The duration of the timelog. Use duration() to generate an ISO duration string.

Returns:

Dictionary of Item object and Edge object

Return type:

dictionary {item: Item, edge: Edge}

assign_to(user_key='')

Assign the task to user

Parameters:

user_key (string) – The user key

Returns:

Created assigned edge object

Return type:

Edge

get_assigned_users()

Gets all the assigned users to the task

Returns:

List of User or Usergroup object and Edge object

Return type:

List of dictionary {item: User | Usergroup, edge: Edge}

get_attachments()

Gets all the task’s attachments

Returns:

List of Item object and Edge object

Return type:

List of dictionary {item: Item or subclass : Asset | Project | Shot | Task | Template | User | Usergroup, edge: Edge}

get_dependencies(mode='BOTH')

Gets the dependencies of the task

Parameters:

mode (string, optional) – The mode (“BOTH”, “IN” or “OUT”). Used to get incoming dependencies, outgoing or both.

Returns:

List of Item object and Edge object

Return type:

List of dictionary {item: Item or subclass : Asset | Project | Shot | Task | Template | User | Usergroup, edge: Edge}

get_statuses()

Gets all the statuses for the task

Returns:

The statuses

Return type:

dictionary

get_subtasks(status='', name='', is_completed=True)

Gets the subtasks of the task

Parameters:
  • status (boolean, optional) – The status used to filter

  • name (boolean, optional) – The name used to filter

  • is_completed (boolean, optional) – Get completed subtasks

Returns:

List of Task object and Edge object

Return type:

List of dictionary {item: Task, edge: Edge}

unassign_from(user_key='')

Unassign the task from user

Parameters:

user_key (string) – The user key

Returns:

Deleted assigned edge object

Return type:

Edge