Like the title says I’m trying to update the task “Assigned to” field to current user when app is launched. but have only been able to update it to the “shotgun support” user. How do I call the current user id?
In file:
X:\pipeline\app_config\release\extensions\projects\sgtk\toolkit_testing\config\hooks\tk-multi-launchapp\before_app_launch.py
If you have context (which you’ll have to have in order for your if statement to be true), then you can get the user from the context (as documented here).
So, ostensibly, you could modify the tasks_assignees block from your code above, so that it looks like this:
I was going to send you down a path of getting the current value of the field, appending your current user to that list, then updating with the full list.
But, as it turns out, the API has a much smarter solution: you can add the multi_entity_update_modes param to your update() call , specifying whether to set, add, or remove.
Can he not upload the pastries as a new distributed pastry config?
It should then automatically download to your desk when you refresh Shotgun Desktop right?