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

How to get associate category with Project Area using server side Java APIs?

 Hi all,


I am trying to find out the filed against category using server side Java API. I can find out associated team areas when my category is associated with team area but which API can be helpful to get associated project area of category when my category is associated with project area?

0 votes



2 answers

Permanent link
com.ibm.team.workitem.common.IWorkItemCommon has a bunch of ICategory/ICategoryHandle related methods and is available in the client and the server API.

E.g. com.ibm.team.workitem.common.IWorkItemCommon.findAllCategories(IProjectAreaHandle, ItemProfile<ICategory>, IProgressMonitor)

0 votes

Comments

  @Ralph Schoon Thanks for the help, I need to find out filed against category, not all

1. I have category which has associated with team area which I successfully fetched using category.getAssociatedTeamAreas();
2. But I have project area association with category, so there is no method to find associated project area, one method is there i.e category.getProjectArea() but this one is generic method not related with association.  Is there any workaround to find catagory's associated project area?


Permanent link

I don't understand the point you are trying to make in item 2. The explanation is lacking. If you want to work with the filed against, then you get the value handle attribute (using com.ibm.team.workitem.common.model.IWorkItem.getValue(IAttribute)) and then use IWorkitemCommon to explore the ICategory Handle you get. E.g. using com.ibm.team.workitem.common.IWorkItemCommon.resolveHierarchicalName(ICategoryHandle, IProgressMonitor) or whatever appropriate method on IWorkItemCommon.

0 votes

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,937
× 1,700

Question asked: Jun 23 '20, 3:50 a.m.

Question was seen: 1,673 times

Last updated: Jun 24 '20, 3:52 a.m.

Confirmation Cancel Confirm