Jump to content

Outgoing_links in tasks not adding up

Simo Virokannas

Recommended Posts

I'm writing an event handler to perform actions on tasks that are linked from a task through outgoing links. However, I never see anything in the outgoing_links collection for a task. The task that is linked does see the same link in the incoming_links collection.

Using the sample project, I created an outgoing link from "Research & Design" to "Documentation" and can see it as outgoing in R&D and incoming in Documentation.

In my event handler for the "task" event, I have this:

    # this is running inside a callback - session is the current session, entity is a single entity
    task = session.get("Task",entity["entityId"])
    print task["name"],task

    print "outgoing links:"
    for link in task["outgoing_links"]:
        print "out",link["from"],link["to"]

    print "incoming links:"
    for link in task["incoming_links"]:
        print "in",link["from"],link["to"]

This yields the following when changing statuses on the two tasks:

Research & Design <Task(31d2294c-6355-11e5-a7c9-42010af0e994)>
outgoing links:
incoming links:

Documentation <Task(8cdb95e0-6359-11e5-bb0d-42010af0e994)>
outgoing links:
incoming links:
in <Task(31d2294c-6355-11e5-a7c9-42010af0e994)> <Task(8cdb95e0-6359-11e5-bb0d-42010af0e994)>

So at least the other task knows about the link, and the IDs match, but the same link isn't visible on the other end. Is there a different way to query outgoing links from a task?

[edit] I'm running the ftrack instance on-premise and it is version

Link to comment
Share on other sites


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

  • Create New...