Query all projects user's been assigned task to

Is there a way to query all projects for a given user has been assigned at least one task on?
I want the returned list of projects to contain a specific list of fields that I’ve determined?

I tried using the summaries option but it doesn’t return what I need. In my case I need each project’s name, code, id in return.

This was my attempt but not quite ideal

result = shotgun.sg.summarize(entity_type='Task',
        filters = [
            # ['entity.Shot.sg_sequence', 'is', {'type': 'Sequence', 'id': 2}],
            # ['sg_status_list', 'is_not', 'na'],
            ['task_assignees.HumanUser.login', 'contains', 'jmartini']
            {'field': 'id', 'type': 'count'},
            {'field': 'project.Project.id', 'type': 'maximum'}
            # {'field': 'project', 'type': 'exact', 'direction': 'asc'},
            {'field': 'project.Project.code', 'type': 'exact', 'direction': 'asc'}

projects = [r['group_value'] for r in result['groups']]
for r in result['groups']:
1 Like

My goal here is to collect all projects that a user has been assigned a Shot > Task where the Status is not marked as not ‘apr’ or ‘fin’