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?
|
2 answers
Ralph Schoon (63.5k●3●36●46)
| answered Jun 23 '20, 9:55 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER edited Jun 23 '20, 9:55 a.m.
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?
|
Ralph Schoon (63.5k●3●36●46)
| answered Jun 24 '20, 3:28 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER 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. |
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.