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

How can I list the categories in my project area and associated team?

I'm trying to find a way to get a list of the Categories defined in my project area and the team area associated to each category.  I have the IProjectArea, but didn't see any way to get the list of Categories (the Categories tab on the project area) and the team area that is associated to each.

Can someone help?
Susan

0 votes



One answer

Permanent link
Susan,

the code below shows how to do that. You can find the code here @ JazzHub:


	/**
	 * Print the Categories for a given Project Area
	 * 
	 * @param teamRepository
	 * @param projectArea
	 * @param monitor
	 * @throws TeamRepositoryException
	 */
	private static void printProjectAreaCategories(ITeamRepository teamRepository,
			IProjectArea projectArea, IProgressMonitor monitor) throws TeamRepositoryException {
		IWorkItemClient workItemClient = (IWorkItemClient) teamRepository.getClientLibrary(IWorkItemClient.class);
		List categories = workItemClient.findCategories(projectArea, ICategory.FULL_PROFILE, monitor);
		System.out.println("Categories of Project Area:");
		for (ICategory iCategory : categories) {
			System.out.println("\tID: " + iCategory.getCategoryId() + "\tName: " + iCategory.getName()); 
		}	
	}

	/**
	 * 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()); 
		}	
	}

1 vote

Comments

Hi All,

 I am also looking for it. Is there shared query/report  so that it is easy to run?

 I created BIRT report to get team list, but  data from report which is fetched from COMMON snapshot doesnt match with project area data.

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

Question asked: Jun 14 '13, 3:44 a.m.

Question was seen: 4,640 times

Last updated: Mar 25 '14, 8:09 a.m.

Confirmation Cancel Confirm