How to get associate category with Project Area using server side Java APIs?
2 answers
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)
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?
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.