Jump to content

Samuel

Members
  • Posts

    2
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by Samuel

  1. Hi,

    We are using the Ftrack's javascript api to query a few different attributes from a Task's Project, and Parent. Since (as far as I am aware) we cannot project custom_attribute fields we are projecting the entire custom_attributes collection and then pulling out the values we need in our code after. A query might look like this currently.

    select project.metadata, project.name, project.custom_attributes, parent.custom_attributes, parent.object_type.name, parent.name, parent.id, id from Task where
        project.status is active
        and assignments any (resource_id="user-id-here")
        and status.name is_not "OMIT"
        and status.name is_not "ON HOLD"
        and status.name is_not "Approved"
        and project.name not_in ("Test", "dev")
        and type.id not_in ("47f5f240-fda1-11e4-92de-002590f35914", "51de618e-fda1-11e4-b48d-002590f35914", "93f57f18-3f90-11e5-841a-002590f35914", "a5cf41a2-84d6-11ea-ae88-0cc47adee6c0")

    What I am wondering is if there is a faster way to query and return this custom_attribute data or just a few of the attributes instead of all as it can take a significantly long time when the number of matching tasks approach 100. If I remove the parent and project custom_attribute projections the query is extremely quick so it seems returning that data is slowing things down a lot but a few fields from that data is required for our tool.

    Just thought I'd ask in-case I missed some recent update that makes this process faster.

    @ftrack/api : v1.0.0
    Ftrack: 4.10.2.2048


    Thanks for your time!

     

×
×
  • Create New...