Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

EWM ELO PUB 7.0.2 - Publish work item categories as a heiarchical list

 Hi, 
If I have a structured set of work item categories... i.e.

  • Cat a
    • Cat a1
    • Cat a2
  • Cat b
    • Cat b1
    • Cat b2
Is there a way I can iterate through these through the Reportable REST API and publish the work items which are listed against the category?

i.e.

  • Cat a
    • Cat a1
      • WI 1
    • Cat a2
      • WI 2
      • WI 3
  • Cat b
    • Cat b1
      • WI 4
    • Cat b2
      • WI 5
      • WI 6
The REST API documentation in Jazz only lists the "Category" as an atribute of a work tiem query, and doesn't appear to be queriable independently?

I'm aware I can query Work Items against known category values, I'm asking more that the initial query is to get the list of "Categories" available in the repository/project area. 

Thanks, 
Glyn

0 votes


Accepted answer

Permanent link
If you use the workitem end point in the Reportable REST API, one of the top levels is category. This will give you all the Categories in all the project areas, and you can filter this using the native filter for the project area you want.

Once you have this, the qualifiedName property gives you the full hierarchy of the Category, separated by a '/', so you can parse this to pull out each level of the hierarchy.

You can then use these values in the native filter for the work items themselves by using the form /workitem/workitem/category/qualifiedName. 

Alternatively you could iterate through the whole list or work items and use the property above to store them in an array before printing
Glyn Costello selected this answer as the correct answer

0 votes


One other answer

Permanent link
Hi Glyn,

I am not sure if you can get all values using the Reportable REST API https://jazz.net/wiki/bin/view/Main/ReportsRESTAPI#category_type_com_ibm_team_worki . It might only be available as attribute value. But I am reasonable sure, you can discover the OSLC Resource shapes for work items in the EWM OSLC API ( https://rsjazz.wordpress.com/2022/02/02/ewm-work-item-oslc-cm-api/ ). The resource shape has a link to the available values for each attribute, where you should be able to get all category values. 

0 votes

Your answer

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

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 12,020
× 113

Question asked: Nov 20 '23, 11:46 a.m.

Question was seen: 839 times

Last updated: Nov 20 '23, 7:04 p.m.

Confirmation Cancel Confirm