Tilt Posted December 15, 2017 Report Share 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 Link to comment Share on other sites More sharing options...
Mattias Lagergren Posted December 18, 2017 Report Share 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 Link to comment Share on other sites More sharing options...
Tilt Posted January 10, 2018 Author Report Share Posted January 10, 2018 sorry, late reply. Thanks, it works as expected by default :-) Link to comment Share on other sites More sharing options...
Tilt Posted September 20, 2018 Author Report Share 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 Link to comment Share on other sites More sharing options...
Mattias Lagergren Posted September 21, 2018 Report Share 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. Link to comment Share on other sites More sharing options...
Tilt Posted September 21, 2018 Author Report Share Posted September 21, 2018 I'll give it a try! Thank you. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.