Jump to content

Vlad Skrypnyk

  • Posts

  • Joined

  • Last visited

Reputation Activity

  1. Thanks
    Vlad Skrypnyk reacted to Steve Petterborg in Correct query for all status from some scheme   
    Hi Vlad,
    The Python API has a convenience method on ProjectSchema objects
    project_schema = session.query( 'ProjectSchema where name is "{}"'.format( "foo" ) ).one() # This is optional, and only needed if you have per-type status overrides in your schema. task_type = session.query( 'Type where name is "{}"'.format( "bar" ) ) task_statuses = project_schema.get_statuses( schema='Task', type_id=task_type['id'], ) https://bitbucket.org/ftrack/ftrack-python-api/src/master/source/ftrack_api/entity/project_schema.py
    The function is implemented in the linked file, and you could get some inspiration from there if you wanted to reimplement it yourself instead.
  • Create New...