Task and Entity Link from object name


I was wondering if there is a way to fill the Task and Entity Link in the collector or tk-multi-publish2 if I already Know what the task is based on the objects name?

when I print item.context.task it returns none until I fill in the 2 fields once I fill them in It will return the proper item.context.task. I’m mainly wondering how to set the item.context.task to a vale and what value it should be possibly something like
item.context.task = [{'type': 'Task', 'id': 12345, 'name': 'Actor'}]

thank you,


Just found the place we do it in our code, it should be
item._context = ctx

I guess you can also assign constituents like task individually.


OK so I figured it out thanks for the tip @mmoshev lead me to editing the collector had to do a parent_item.context._Context__task = task which comes from a shotgun.find of the task then for the link you have to find the link that is made for the task and feed it parent_item.context._Context__entity = entity so all in all I got it working.

Thank you


Yeah forgot to mention this is in the collector.
Glad you made it work.