Jump to content

How to changhe Task status in an Action ?


Recommended Posts


I'm searching a way to update Task status when launching a particular action.
(the Action launches After Effects, and I want the task's status to be updated from Not Started to In Progress)

I tried :
task.setStatus("In Progress")
>>>> AttributeError: 'Task' object has no attribute 'setStatus'

I tried :
task['status']['name'] = "In Progress"

=> it changes the name of the status in the UI. And I have to go to the system settings / statuses to revert this.
I understand I change the display name of the status object itself, and not the status / state of the task.

I tried :
status = session.query('Status').all()
my_task['status'] = status[8]

I wanted to set the status attribute with a Status Object, but...
>>>> ftrack_api.exception.ServerError: Server reported error: PermissionError(Permission denied: not allowed to 'update' 'StatusType'. Operation 'update' can never be done on 'StatusType'.)


I'm sure (actually I hope...) I'm missing something trivial...
Any help appreciated ^^




Link to comment
Share on other sites


Your second example looks right, I wounder if you could have had something else in your session when you committed? Could you try the code below, the only difference here is that we make sure the status is valid for the tasks project.

session = ftrack_api.Session(

task = session.query(
  'select project.project_schema from Task'

valid_statuses = task['project']['project_schema'].get_statuses(

task['status'] = valid_statuses[0]





Link to comment
Share on other sites

Hi Eric.

I closed the session to be sure no there is nothing problematic in my commit.
Your solution posted above worked fine.
So you're right, I was having issues in the commit that were throwin errors.

When status are not valid for the task, the error message is explicit, so that was not the problem.


Server reported error: ValidationError(Object "Task" cannot have status "Client approved".)


Thanks for your help

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...