TTT Posted December 10, 2016 Report Posted December 10, 2016 Is it possible to view and copy paste the link to the session for each memeber of a review session. I often have clients who dont get the email, be it for their spam filter setting or corporate firewalls. The last thing I want to do is debug the clients firewall and they always get really anxious about not finding the email, if I could jsut send them the link it would be perfect.
Mattias Lagergren Posted December 12, 2016 Report Posted December 12, 2016 This is not supported out-of-the-box but could be added using the Actions framework. So with some simple python you could add an interface that displays the links for each reviewer to allow copy/paste.
TTT Posted December 12, 2016 Author Report Posted December 12, 2016 oh nice. not asking for you to do the work but if you have some sample code for reviews let me know
tokejepsen Posted December 12, 2016 Report Posted December 12, 2016 Hey @TTT This may help as a starting point for the action you want to build; https://github.com/tokejepsen/ftrack-hooks/blob/master/ftrack_connect_hooks/hook/review_sort.py
Mattias Lagergren Posted December 13, 2016 Report Posted December 13, 2016 Here is an action listing the names and links for each invitee: import logging import ftrack_api logging.basicConfig(level=logging.INFO) session = ftrack_api.Session() identifier = 'review-session-list-invitees' def discover(event): '''Return action for event.''' for selected_item in event['data'].get('selection', []): if selected_item['entityType'] == 'reviewsession': return { 'items': [{ 'label': 'List invitees', 'actionIdentifier': identifier }] } session.event_hub.subscribe( 'topic=ftrack.action.discover', discover ) def launch(event): '''Launch *event*.''' items = [] for selected_item in event['data'].get('selection', []): if selected_item['entityType'] == 'reviewsession': review_session = session.get( 'ReviewSession', selected_item['entityId'] ) items.append({ 'type': 'label', 'value': u'**Invitees for {0}**'.format(review_session['name']) }) for invitee in review_session['review_session_invitees']: items.append({ 'type': 'label', 'value': u'{0}: {1}/review/{2}'.format( invitee['name'], # Do not use private variable. session._server_url, invitee['id'] ) }) return { 'items': items } session.event_hub.subscribe( 'topic=ftrack.action.launch and ' 'data.actionIdentifier="{0}"'.format(identifier), launch ) session.event_hub.wait()
TTT Posted December 13, 2016 Author Report Posted December 13, 2016 this is amazing thanks. kind of weird to have a local python code executed on a website... this helps a lot.
TTT Posted June 5, 2019 Author Report Posted June 5, 2019 reviving this topic as I would like to find out how this could be done in a way it would be accessible to the whole team. Can we do this without having the ftrack action plugin running on all the machines? can this be generated with the JS api on the site?
Lorenzo Angeli Posted June 14, 2019 Report Posted June 14, 2019 Hi @TTT there's no need to install it locally to each machine. This event can be easily hosted on a central network folder and mapped into the FTRACK_CONNECT_PLUGIN_PATH Hope it helps. L.
Chandler Posted January 24, 2020 Report Posted January 24, 2020 TTT, if you have any kind of server or cloud instance of your own you can also run Actions as single always-running processes. These actions will be visible in the Web + Connect to all users without each person having to run the plugin via their launched Connect instance. As long as my action doesn't have a need to interact with local resources on that person's computer, I find this a much better way making Actions available for people. Thanks a lot for this boilerplate code guys - we are looking to implement the concept of a "generic" link that we can send to certain clients without it being personalized to their email address. This should get us there nicely.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now