It's all about the answers!

Ask a question

Add User to Team Area


pere irazusta (2062120) | asked Sep 07 '11, 11:07 a.m.
Hi,

I'm triying to add programmatically a determinate user to a determinate project area, but I'm having some problems on 'finding' the Team Area.

Get User:

IContributorManager contribService= teamRepository.contributorManager();

IContributor[] user = new IContributor[1];
user[0] = contribService.fetchContributorByUserId("sdfsd", null)


Get Team Area:
Can't find a way to get a Team Area by any attribute. I've tryed from IProcessClientService, and the IProjectArea but can't find anything.

Add user to the area:
I suppose it would be something like:
ITeamArea teamArea = teamArea.addMember(user)


Any idea?

Thanks!

5 answers



permanent link
Qiong Feng Huang (76911610) | answered Sep 13 '11, 10:10 a.m.
JAZZ DEVELOPER
We need to add them to several Team Areas programmaticaly because we have to introduce over 5000 users, so do it using the UI is not an option.

Thanks!


Currently, we don't have public Java API to manipulate process memberships. But we do support it in REST API. Here is the guidance about bulk manipulation of process memberships: https://jazz.net/library/article/633

permanent link
pere irazusta (2062120) | answered Sep 08 '11, 4:46 a.m.
Searching i've found https://jazz.net/forums/viewtopic.php?t=14812
an approach to get a determinate Team Area through IItemManager.fetchCompleteItem() but can't manage to make it work, and I can't find any snippet.

Any idea/reference/snippet on how to approach to this?

Thanks!

permanent link
Qiong Feng Huang (76911610) | answered Sep 09 '11, 5:17 a.m.
JAZZ DEVELOPER
Why do you use java api to add a user to a team area? Normally, we should use UI to add user.

permanent link
pere irazusta (2062120) | answered Sep 09 '11, 7:13 a.m.
We need to add them to several Team Areas programmaticaly because we have to introduce over 5000 users, so do it using the UI is not an option.

Thanks!

permanent link
pere irazusta (2062120) | answered Oct 10 '11, 12:23 p.m.
Thanks for pointing the good solution.

Nice and complete article!

Your answer


Register or 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.