ynput / ayon-ftrack

Apache License 2.0
3 stars 9 forks source link

AssetVersion does not have correct AYON id #142

Open iLLiCiTiT opened 1 month ago

iLLiCiTiT commented 1 month ago

Current Behavior:

This requires full validation, but it looks like AYON id and AYON path are not filled properly on AssetVersion if user does not have read permissions for the custom attribute. Integrate API is warning about missing AYON id custom attribute.

Some of existing automations expect that AYON id is filled on versions, it is very important for future to have versions with already filled ayon id to be able to do statuses and comments sync.

Expected Behavior:

We have to validate this is correct assumption first. Check if AYON id on AssetVersion is really id of version, or folder.

We should probably not use entity["custom_attributes"][attr_name] = value to change the value, but use ftrack session operations using custom attribute configurations.

Consequences

The later we will fix this issue the longer we won't be able to do some synchronizations, like status.

iLLiCiTiT commented 1 week ago

So, I did some investigation. User on ftrack must have read role to be able to get attribute configuration, so even if has write role, he can't do it because he does not have a way how to get the attribute id.

Result: Only way would be to give all users Read role for ayon id custom attribute. We can wait until reviewables are not integrated during publishing but on upload to AYON.