Managers
2 2

8 posts in this topic

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

Edited by Mattias Lagergren
Moderator: Merged topics

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
2 2