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

Is it possible in RTC to get the history of an wotrkitem with all the attributes changed that are recorded in history via REST?

 I am trying to get use a REST API to get the history of an workitem with all the attributes that are recorded as changed in the hostory. I am using "https://server/ccm/rpt/repository/workitem?size=10&fields=workitem/workItem[id=123]/(itemHistory/*)" to do so but I am not getting all the attributes. It only gives me datemodified, descriptiona an summary. But what I am after is to get any changes recorded. Is there possiblility to do that via REST in RTC?

0 votes



2 answers

Permanent link

 First of all, EWM has many APIs. The API you use above is referred to as reportable REST API.


This is the only public REST APIs that allow access to the history off a work item that I am aware of. 


To get the history:

  • itemHistory (type: com.ibm.team.workitem.WorkItem, maxOccurs: unbounded). A collection of zero or more WorkItem elements, representing the entire history of the work item. Each state the work item has ever been in is reflected in this history list.

The correct syntax is 


That returns all work item states with all the attributes that are set.

1 vote

Comments

I edited the answer providing the correct syntax. The correction would not work in  a comment for whatever reason. 


Use (itemHistory/(*))


Permanent link

Hi Ralph Schoon 

Thanks for the reply. I tried the api you suggested but still I am not getting all the attribute. Moreover, I can see the xml response with lots of 
<category/>
<customAttributes/>
<customAttributes/>
<customAttributes/>
<customAttributes/>
<customAttributes/>
<customAttributes/>
<customAttributes/>
<customAttributes/>
<customAttributes/>
<customAttributes/>

and no display value for them. Is that because this fields could be custom field and not out of box field

0 votes

Comments

No value means that there is no value set. 


"not getting all the attribute" - if you are interested in help here on the forum, provide details

I have answered what I can. If I wanted to know more, especially custom attributes, I would make sure I understand what values the work item actually has and try to set all attributes and then check what the reportable REST API provides.

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

Question asked: Jan 17 '22, 8:59 p.m.

Question was seen: 1,538 times

Last updated: Jan 20 '22, 10:47 p.m.

Confirmation Cancel Confirm