ynput / ayon-shotgrid

A Shotgrid Addon for the Ayon server.
Apache License 2.0
5 stars 8 forks source link

🚀 Flow 2ways Sync #130

Open dee-ynput opened 1 month ago

dee-ynput commented 1 month ago

SubEpic of 🚀 Prod Trackers 2ways Sync

Strategy

Flow addon must support two ways synchronization of all relevant data. This includes syncronizing:

Generic User Stories

(Applicable for each of the checkbox in the strategy section)

jakubjezek001 commented 1 month ago

I believe the two-way synchronization of statuses and assignments is already done, but it needs to be tested. As far as I remember, it was implemented by @fabiaserra.

fabiaserra commented 1 month ago

I believe the two-way synchronization of statuses and assignments is already done, but it needs to be tested. As far as I remember, it was implemented by @fabiaserra.

That's correct, it's been working fine for us

jakubjezek001 commented 1 month ago

I believe the two-way synchronization of statuses and assignments is already done, but it needs to be tested. As far as I remember, it was implemented by @fabiaserra.

That's correct, it's been working fine for us

It looks like it's only working on your fork. I checked the assignees, and there's no sign that we're syncing user assignments on tasks. This might be because we haven't merged User syncing #76 yet.

fabiaserra commented 4 weeks ago

It looks like it's only working on your fork. I checked the assignees, and there's no sign that we're syncing user assignments on tasks. This might be because we haven't merged User syncing #76 yet.

Hmmm that shouldn't be necessary, although perhaps thanks to that functionality I can make some assumptions due to our login field in SG matching the username in AYON without having to do extra gimmicks: https://github.com/fabiaserra/ayon-shotgrid/blob/release/alkemyx/services/shotgrid_common/utils.py#L686

Coincidentally, I just finished a refactor of the user syncing functionality in our fork so it syncs the users and its project access (or role if they are admin, management and producers so they have access to all projects) automatically when there's a project assignment event in Shotgrid so you don't have to click any button. Here are the relevant changes on that: https://github.com/fabiaserra/ayon-shotgrid/blob/release/alkemyx/services/shotgrid_common/ayon_shotgrid_hub/update_from_shotgrid.py#L467 and https://github.com/fabiaserra/ayon-shotgrid/blob/release/alkemyx/services/leecher/leecher/listener.py#L109

And I also added support for when there's hierarchy changes in the Shotgrid project (a shot gets parented to a sequence after the sync already happened) those get re-parented as expected, that change was done here: https://github.com/fabiaserra/ayon-shotgrid/blob/release/alkemyx/services/shotgrid_common/ayon_shotgrid_hub/match_shotgrid_hierarchy_in_ayon.py#L133

fabiaserra commented 4 weeks ago

It looks like it's only working on your fork. I checked the assignees, and there's no sign that we're syncing user assignments on tasks. This might be because we haven't merged User syncing #76 yet.

Well duh, I see that you never merged this other PR either https://github.com/ynput/ayon-shotgrid/pull/113, this one is the one relevant to get that functionality working