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

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.

0 votes



One answer

Permanent link
	/**
	 * 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);
		List categories = 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()); 
		}	
	}

0 votes

Comments

Hello Raplh,
Thanks for reply!!
I am having 3 level team hierarchy and my category associations are with third level team. So associations look like this,(considering above mentioned hierarchy)
Category Name
SubTeamA1 ->               A/Team A/SubTeamA1

When my category associations was with parent team like,
SubTeamA1-> Associates with        A
I had used below mentioned function and it was working for me.
List<ICategory> list2= workItemCommon.findCategoriesOfTeamArea(parentTeamProcessArea, ICategory.FULL_PROFILE, monitor);

But now, associations are with third level team. And I want to get all categories start with ParentTeam/... for a particular selected Parent team.

Kindly revert for any concerns.

Thanks.

If you want to do this kind of stuff, I would suggest to enable yourself to do it.

Start here: Setting up Rational Team Concert for API Development follow it and do the workshop to setup your SDK. Follow Understanding and Using the RTC Java Client API
and use https://rsjazz.wordpress.com/2012/12/09/analyzing-a-aroject-areas-members-and-roles-using-the-plain-java-client-libraries/ to get the code above to work.

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

Question asked: Sep 23 '15, 5:45 a.m.

Question was seen: 2,181 times

Last updated: Sep 24 '15, 6:48 a.m.

Confirmation Cancel Confirm