How to get Team Area of a WorkItem [using multiple timelines] in Plain Java API
I need to export work item information. I am able to export everything of a workitem except the calculated team area. I tried to calculate the teamarea by myself, but I stuck with the implementation of it. Is there anyone who did this before or who can point me out how to do this?
Any tip is highly appreciated.
EDIT:
I was successful getting all team areas of a category. But I don't know how to get further on as I have multiple timelines where another team area is associated to the same category
As you see in the example below, the Category "Test Category" is associated to the Project Area by default on the "Main Development" Timeline. As soon as I switch the timeline to "Timeline 1", the category is associated to the team "Team 1", the same for "Timeline 2" with "Team 2"
My current source:
|
2 answers
I have finally managed to find this out by myself. Here's the solution:
|
You can get the information from the work item category. For example, given a connection the list of categories can be had:
List<ICategory> findCategories = service.findCategories( projectArea, ICategory.FULL_PROFILE, jazzServer.getMonitor()); You can get the category attribute from a IWorkItem workItem.getCategory(). Given the category you can use the getDefaultTeamArea() or getAssociatedTeamAreas(). However the workItem.getCategory() return might have to be cast or otherwise retrieved. Comments
Lukas Steiger
commented Feb 05 '14, 2:04 a.m.
I have tried a similar approach as you (see my edited question above). But I have troubles if I have multiple timelines where the team area is different between the timelines |
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.