It's all about the answers!

Ask a question

Where do I find the Team Area(s) associated with a Category?


Davyd Norris (6496) | asked Oct 18 '18, 7:09 a.m.
Hi all,

I am trying to retrieve the team areas associated with a category, using either the JavaScript API or the REST API.

Running this Reportable REST API call:

https://<server>/ccm/rpt/repository/workitem?fields=workitem/category[projectArea/name='<project>']/(*)

will retrieve all the information for the Categories in a specified Project Area, and on the Category there are nodes for teamAreas and defaultTeamArea, but they never display any data:

  <category>
    <projectArea></projectArea>
    <uniqueId>65b6e5...8c2282708</uniqueId>
    <reportableUrl>https://<server>/ccm/rpt/repository/workitem/category/itemId/_2GMF0...OlmSDQ</reportableUrl>
    <itemType>com.ibm.team.workitem.Category</itemType>
    <stateId>_UtKARt...xhUA</stateId>
    <itemId>_2GM...lmSDQ</itemId>
    <contextId>_2teIkM...VxhUA</contextId>
    <modified>2018-10-18T05:11:52.132+0000</modified>
    <name>Some Team</name>
    <description></description>
    <id>/Unassigned/Some Team/</id>
    <archived>false</archived>
    <readAccessEnabled>false</readAccessEnabled>
    <modifiedBy></modifiedBy>
    <teamAreas></teamAreas>
    <defaultTeamArea></defaultTeamArea>
    <qualifiedName>Some Team</qualifiedName>
  </category>

Strangely, the Project Area node works fine in the XPath query but it too isn't displayed.

The actual end result that I'm trying to achieve is to set the Owner of a work item to be the person who is the Team Lead in the team associated with the Category. I can already get the id of the Team Lead for a team, so now I need to get the team for the work item somehow.

Any assistance would be much appreciated.

Be the first one to answer this question!


Register or to post your answer.