Vlad Skrypnyk Posted April 23, 2021 Report Share Posted April 23, 2021 How to write correctly query to get only statuses from some scheme ? Link to comment Share on other sites More sharing options...
Guest Posted April 23, 2021 Report Share Posted April 23, 2021 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. Link to comment Share on other sites More sharing options...
Vlad Skrypnyk Posted April 24, 2021 Author Report Share Posted April 24, 2021 Hi Steve Thanks for help Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now