how to fetch user names and their email address who belong to a team area?
shruti gudagur (28●1●11●15)
| asked Jun 04 '14, 6:46 a.m.
edited Jun 10 '14, 2:41 a.m. by Ralph Schoon (63.6k●3●36●46)
Hello,
can i fetch all the user names and their email address who belong to a particular team area? are their any OSLC/REST api's to meet this requirement? Thanks Shruti |
Accepted answer
Hi,
Using java client api, method would look something like this. public void fetchContributorsFromTeamArea(ITeamArea iTeamArea) throws TeamRepositoryException { IContributorHandle[] iContributorHandles = iTeamArea.getMembers(); int i = 0; for (IContributorHandle iContributorHandle : iContributorHandles) { IContributor iContributor = (IContributor) repository.itemManager() .fetchCompleteItem(iContributorHandle, IItemManager.DEFAULT, monitor); System.out.println(iContributor.getName() + "\t" + iContributor.getUserId() + "\t" + iContributor.getEmailAddress()); } } shruti gudagur selected this answer as the correct answer
|
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.