Jump to content

Patrick Boucher ftrack

Members
  • Posts

    55
  • Joined

  • Last visited

  • Days Won

    7

Posts posted by Patrick Boucher ftrack

  1. Hi Evan,

    Which documentation are you referring to that mentions `<` and `>`? I want to check it out and ensure it accurately reflects current capabilities.

    As for your initial question, it is my understanding that anything past the boundary of a list is not accessible via the dot notation in a subscription. This would preclude you from accessing `changes.statusid.<new|old>` and `keys.statusid`. These kinds of things need to be implemented in your callback.

    Regards,
    Patrick

  2. Hi Walt,

    That is currently not possible. We don't have a button UI element besides the default submit button (and cancel via the `X` in the top right).

    I've submitted a feature request on your behalf for consideration by the product team.

    In the short term, depending on your objectives, implementing your tool with another UI framework (standalone app, external web app embedded in ftrack or not) may be a better solution if its requirements exceed current capabilities.

    Cheers,
    Patrick

  3. Hi Walt,

    That is currently not possible. When using ftrack's simple UI functionalities available via the event hub (https://help.ftrack.com/en/articles/1040465-actions#:~:text=Read more here.-,User interface,-When an action). Using this method, no logic can be sent to change the UI dynamically and no message is sent back for you to process until the form is submitted. This makes it impossible in the current system to create a dynamic UI that refreshes "on_change".

    I've submitted a feature request on your behalf for consideration by the product team.

    In the short term, depending on your objectives, implementing your tool with another UI framework (standalone app, external web app embedded in ftrack or not) may be a better solution if its requirements exceed current capabilities.

    Cheers,
    Patrick

  4. Hi Samuel,

    As I understand things, it is not possible to project to get only certain custom attributes. If I were you, I'd explore fetching your tasks without the custom attribute values and then getting the few custom attribute values that interest you in a second pass. For example, once you have your tasks you could do something like:

    cac = session.query('CustomAttributeConfiguration where label is fps_h').one()
    cav = session.query(f"CustomAttributeValue where entity_id is {task['id']} and configuration_id is {cac['id']}").one()

    Obviously this is Python, which is what I was testing with, but you can easily adjust to taste. You can also obviously query for `CustomAttributeConfiguration` records based on multiple keys or labels based on your needs and then query for `CustomAttributeValue` records based on multiple `entity_id` based on your task query and multiple `configuration_id` based on your `CustomAttributeConfiguration` query.

    I'd encourage you to profile both approaches to see if the second would get you gains based on your particular circumstances.

    If your use case isn't dynamic in nature, you could also forgo the `CustomAttributeConfiguration` query by "hardcoding" those ids in your `CustomAttributeValue` query in a similar way you're doing it for `type.id` in your `Task` query.

    Cheers,
    Patrick

  5. Hi @lastmatador,

    The Python automatically fetches default projections for you. You have to manually specify the projections you want to load with the Javascript API. You can use the default projections from the schema as follows:

    const entityType = 'Task'
    const projection = session.schemas.find(
      (schema) => schema.id === entityType
    ).default_projections;
    
    const response = await session.query(`select ${projection.join(',')} from ${entityType} limit 1`);
    console.log(response);

    The schema also has a list of properties for the entity type, so you could use that list to extract all the property names if you wanted to load _everything_ instead of just the default ones.

    I hope this helps!


    Cheers,
    Patrick

  6. Hi @YuChen,

    This is absolutely possible.

    Go to System Settings -> Security -> Roles and edit the particular role you'd like to restrict. Then, make sure the "Delete project" and "Delete objects" permissions are unselected but that "Delete versions" is selected. I think this will result in the behaviour you're looking for.

    image.png

    Here is more information on permissions in ftrack:
    https://ftrack.zendesk.com/hc/en-us/articles/360004401497-Establish-security-roles-and-permissions

    Regards,
    Patrick

  7. Hi Gareth,

    The behaviour is, to my knowledge, not a known issue in any ftrack version. Could you submit a bug to the support team so that we can help you work this out?

    https://ftrack.zendesk.com/hc/en-us/requests/new

    Please specify which version of ftrack you're using (System Settings -> General Settings -> About) and if you can provide a screencast of the behaviour that would be awesome.

    Thanks!
    Patrick

  8. Hi @Nicholas Yue,

    Please use the following query. It should work. Our documentation is unfortunately out of date and we'll be looking into fixing this as soon as possible.

    assets = session.query('AssetVersion where asset.parent.project.name is "{project_code}"'.format(project_code=project_code)).all()

    Regards,
    Patrick

  9. Hi Byron,

    ftrack doesn't currently have an attribute that would list Reviews in the same way lists can be displayed in the spreadsheet. I'll submit this as a feature request on your behalf with our product team.

    In the short term this could be worked around using a custom attribute and some triggers if you have some pipeline engineers that can design and implement this kind of solution.

    You could also build a query filter that would list any versions linked to a particular set of reviews. Depending on the case though, this may not be more efficient that looking at individual reviews:

    review_session_objects.review_session.name = 'Some Review Name'

    or

    review_session_objects.review_session.name in ('First Review', 'Second Review')
  10. Hi Fernando,

    The `session.reset()` call only clears the internal cache of objects, it doesn't affect the connection.

    Each call to the server is independent and always re-authenticated at every call. Given that way of working and the stateless nature of HTTP, there is no timeout on the session lifetime itself. You can hit a timeout if a _single query to the server_ takes too much time. This is capped at 60s by default.

    Cheers,
    Patrick

  11. Hi Fernando,

    The ftrack API is session based. Any operations you do are saved into the session. When you `commit()` these operations are persisted on the server. If there is a failure, the operations won't be persisted on the server and they also won't be removed from the session. If you don't handle the error and just leave the failing operation in the session's queue and `commit()` again, even after having added more operations, things will fail again.

    Methods like rollback and reset will help you manage the session's operations.

    In your case, it looks like one task's creation failed following a `commit()` operation but your script kept on going adding more create, update or delete operations but failing every time it tried to commit because of the original task creation.

  12. Hi Evan,

    You say that you ran the same code:

    ftrack_api.Session(auto_connect_event_hub=True, **auth)

    on another computer system and it worked?

    If that's the case, I'd be surprised if it was the ftrack server itself that was being temperamental.

    • Are both computers on the same network?
    • Is there a proxy or firewall between the failing computer and ftrack?
    • Is this error consistently reproducible (or sporadic)?

    Thanks,
    Patrick

×
×
  • Create New...