Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

how to get team area member list by server api

how to get team area member list by server api?
I found I can get team area name :
ICategoryHandle categoryHandle = newState.getCategory();  
                ICategory category = iac.resolveAuditable(categoryHandle, ICategory.DEFAULT_PROFILE, null);
                List teamAreas = category.getAssociatedTeamAreas();
                String teamAreaString=category.getName();

but i need to get this team area memeber list
any one knows?

0 votes



One answer

Permanent link

 From, https://rsjazz.wordpress.com/2012/11/30/a-create-approval-work-item-save-participant/ slightly modified assuming you have a project or team area:




    /*
     * Finds contributors by role on a process area.
     * 
     * @param processArea
     * @param roleName
     * @param monitor
     * @return
     * @throws TeamRepositoryException
     /
    private IContributorHandle[] findContributorByRole(
            IProcessArea processArea, String roleName,
            IProgressMonitor monitor) throws TeamRepositoryException {

    IProcessServerService processServerService = getService(IProcessServerService.class);
    IContributorHandle[] members = processArea.getMembers();
    IContributorHandle[] matchingContributors = processServerService
            .getContributorsWithRole(members, processArea,
                    new String[] { roleName });

    return matchingContributors;
}

private IContributor getContributorFromHandle(IContributorHandle handle) throws TeamRepositoryException{
    IRepositoryItemService repositoryItemService = getService(IRepositoryItemService.class);;
    return (IContributor) repositoryItemService.fetchItem(handle, IRepositoryItemService.COMPLETE);
}

</pre>

0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,930

Question asked: Jul 09 '19, 2:48 a.m.

Question was seen: 1,700 times

Last updated: Jul 09 '19, 3:16 a.m.

Confirmation Cancel Confirm