Jump to content

Managers


Tilt

Recommended Posts

  • 1 year later...
  • 7 months later...

Im trying to find where I can return  a list of the managers of a project from it seemed easy in the old api of using project.getManager(), but in the new version im having issues ive tried scanning through at both a task and project level to no success any help would be greatly appreciated.

cheers

Link to comment
Share on other sites

On 9/7/2018 at 4:59 AM, peter divers said:

Im trying to find where I can return  a list of the managers of a project from it seemed easy in the old api of using project.getManager(), but in the new version im having issues ive tried scanning through at both a task and project level to no success any help would be greatly appreciated.

cheers

Hey, 

I was trying to find a similar solution and I came up with a workaround. I am listing users that create calendar events in the overview for the project that in my case are the managers. Try this:

def get_managers(session, project_name):
	events = session.query('Project where full_name is "{}"'.format(project_name)).one()['calendar_events']
	managers_list = sorted(set([x['created_by']['username'] for x in events]))
	return managers_list
Link to comment
Share on other sites

  • 1 month later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...