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

How to add users and roles in child team area using plain java API

 Is it possible to add users and roles in child team area? My code currently can add users and roles in team areas but how can I add them in child team area.
ITeamArea TA = (ITeamArea)teamRepository.itemManager().fetchCompleteItem(newTAHandle,ItemManager.DEFAULT,monitor);
 IContributor contributor = teamRepository.contributorManager().fetchContributorByUserId(members,monitor);
 ArrayList roles  = getTeamRoleName(projectArea,member_roles);
 IProcessAreaWorkingCopy areaWc = (IProcessAreaWorkingCopy)service.getWorkingCopyManager().createPrivateWorkingCopy(TA);  
 areaWc.getTeam().addContributorsSettingRoleCast( new IContributor[] {contributor}, new IRole[] {roles})); 
 areaWc.save(null);

I was trying to find the hierarchy stuff, but then not finding the option of adding contributors to child team area.
IProjectArea workinCopyProjectArea = (IProjectArea) projectArea.getWorkingCopy();
ITeamAreaHierarchy teamAreaHierarchy = (TeamAreaHierarchy) workinCopyProjectArea.getTeamAreaHierarchy();

0 votes



One answer

Permanent link
You get the ITeamArea of the sub team and use the same API you use for the top level team area.

0 votes

Comments

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,948

Question asked: Aug 01 '13, 4:44 p.m.

Question was seen: 4,558 times

Last updated: Aug 02 '13, 2:32 a.m.

Confirmation Cancel Confirm