0

How to search if an artist is not assigned to any tasks across multiple projects?

Hello, we always have many fast paced projects active concurrently because we make broadcast motion graphics. Therefore, it would be highly useful if we could search across all projects and generate a report which lists artists who are not assigned to any tasks or are unassigned and not scheduled to start a task within a certain number of days.  We have not fully setup up shotgun yet so I still can alter our setup. 

Another method might be to utilize the shotgun API and make my own Web App or desktop application to present the information.

How do other people handle this? Thanks for tips.

 

1 comment

  • 0
    Avatar
    Kym Watts

    Hi Adam,

    They way we have done it is like this.

    snip--->

    # get all the active users in shotgun.
    user_list= sg.find("HumanUser",[['sg_status_list','is','act']],['name'])

    # loop throught the active users
    for user_entity in user_list:
    #status = user_entity.get('sg_status_list')
    name = user_entity.get('name')

    # use a nested/ advanced filter to remove as many results as posible.
    task_filter = [
    ["sg_status_list", "is_not", "clsd"], #assumption that you do not want to include tasks that have been closed already
    {
    "filter_operator": "any",
    "filters": [
    [ "task_assignees", "in", user_entity ], # we want to see if the user is in the "to" field
    [ "addressings_cc", "in", user_entity ] # we want to see if the user is in the "cc" field
    ]
    }
    ]
    current_assignments = sg.find('Task', task_filter,[])

    if len(current_assignments) == 0:
    print 'Not assigned to any tasks:',name

     

    <---snip

    The this is not the fastest way to do it and greatly depends on a) the amount of active uses you have and b) the amount of tasks you have in shotgun.

    you could further refine the task search to return only tasks on the active projects you have.

     

    hope this helps.

    Cheers

    Kym 

Please sign in to leave a comment.