It's all about the answers!

Ask a question

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


Andrew Ciaz (59163) | asked Jun 23 '20, 3:50 a.m.

 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



permanent link
Ralph Schoon (63.3k33646) | 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
Andrew Ciaz commented Jun 23 '20, 10:15 a.m. | edited Jun 24 '20, 3:52 a.m.

  @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
Ralph Schoon (63.3k33646) | 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


Register or 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.