How to get associated category for a team?
Hello,
I am having team structure as follows,
Project Area
A
Team A
SubTeamA1
SubTeamA2
Team B
SubTeamB1
SubTeamB2
And categories are associated as follows,
Category Name Associate with
SubTeamA1 -> A/Team A/SubTeamA1
subTeamB1 -> A/Team B/SubTeamB1
Likewise there are number of teams at following after A. I am developing value set plugin.
Now, I want a list of all categories under A(Start with A/...). How to get this?
Thanks in advance.
I am having team structure as follows,
Project Area
A
Team A
SubTeamA1
SubTeamA2
Team B
SubTeamB1
SubTeamB2
And categories are associated as follows,
Category Name Associate with
SubTeamA1 -> A/Team A/SubTeamA1
subTeamB1 -> A/Team B/SubTeamB1
Likewise there are number of teams at following after A. I am developing value set plugin.
Now, I want a list of all categories under A(Start with A/...). How to get this?
Thanks in advance.
One answer
/** * Print the Categories for a given Process Area * * @param teamRepository * @param processArea * @param monitor * @throws TeamRepositoryException */ private static void printProcessAreaCategories(ITeamRepository teamRepository, IProcessArea processArea, IProgressMonitor monitor) throws TeamRepositoryException { IWorkItemClient workItemClient = (IWorkItemClient) teamRepository.getClientLibrary(IWorkItemClient.class); Listcategories = workItemClient.findCategoriesOfProcessArea(processArea, ICategory.FULL_PROFILE, monitor); System.out.println("Categories of Process Area:"); for (ICategory iCategory : categories) { System.out.println("\tID: " + iCategory.getCategoryId() + "\tName: " + iCategory.getName()); } }