Tilt 15 Report post Posted December 15, 2017 I'm migrating our last bits of code from the old API to the new one. Is there a replacement for .getDefaultRecipients() when adding notes to asset versions? That function seems to be missing. Do I just look for all users assigned to the task and add them as recipients manually? cheers Stefan Share this post Link to post Share on other sites
Mattias Lagergren 145 Report post Posted December 18, 2017 Hi Tilt, the default recipients should now be automatically added to the note when you create it. Is that the behaviour you want or do you need more control? If you need do set them manually there are some docs here: http://ftrack-python-api.rtd.ftrack.com/en/stable/example/note.html Share this post Link to post Share on other sites
Tilt 15 Report post Posted January 10, 2018 sorry, late reply. Thanks, it works as expected by default :-) Share this post Link to post Share on other sites
Tilt 15 Report post Posted September 20, 2018 Sorry to resurrect this old thread... getDefaultRecipients was a really nice thing in the legacy API. We're searching for a workaround for this use case: A note should get created on an asset version but not only the default recipients should get it. For example, we might want notes to a lighting task asset version also be sent to the artist assigned to the comp task. Previously, I used the result from getDefaultRecipients (which included all managers) and added the user that was assigned to comp. Now that is no longer possible, because create_note() will override the default recipients if I manually add some. Managers are also not implemented in the new API yet (and I remember reading that it's not on the todo list) so I can't just add the managers in the create_note() call myself. Are there any workarounds? Is it possible to somehow "trick" ftrack into considering a certain user as part of the default recipients? Maybe using links? cheers Stefan Share this post Link to post Share on other sites
Mattias Lagergren 145 Report post Posted September 21, 2018 16 hours ago, Tilt said: Are there any workarounds? Is it possible to somehow "trick" ftrack into considering a certain user as part of the default recipients? Maybe using links? It might be worth testing: # Create note, do not commit or pass recipients note = asset_version.create_note(...) # Create recipient, but do not add it to the note collection. session.create('Recipient', { 'note_id': ..., 'resource_id': ... }) session.commit() It might work but I cannot guarantee that it will keep working. Share this post Link to post Share on other sites
Tilt 15 Report post Posted September 21, 2018 I'll give it a try! Thank you. Share this post Link to post Share on other sites