some questions about Reportable REST API
As a follow up of https://jazz.net/forum/questions/149119/is-it-possible-to-access-work-item-history-via-plain-java-api-or-oslc
My goal is to find out the status (change) of workitem at different (changed) dates (for each workitem satisfying a query)
I was able to play around for sometime with the Reportable REST API and was able to get the worktiem history
Regarding the status I see something like this in the history
<predecessor>_AZrXQcu5EeO08OhFHLECUA</predecessor>
How can I find out to which state this _AZrXQcu5EeO08OhFHLECUA belongs to?
Also I read that the Reportable REST API is different from regular OSLC for work items. This means that I will not be able to execute a predefined query via Reportable REST API right?
Accepted answer
sorry, state and list of states (set of attributes at point in time) makes for confusing talk.
you want the text value of the status field of each workitem change in its history...
this works
https://localhost:9143/ccm/rpt/repository/workitem?fields=workitem/workItem/%28id|summary|itemId|itemHistory/%28stateId|predecessor|state/name%29%29
returns
<workItem><id>7</id><summary>fribble</summary><itemId>_1EHXgEiCEeOJEeGE8YExBw</itemId><itemHistory>
<stateId>_IMLykcxvEeOjLf0lpIM4lw</stateId>
<predecessor>_z2k6oMoZEeOjy4RglL53dA</predecessor>
<state><name>In Progress</name></state></itemHistory>
<itemHistory>
<stateId>_oVGrUnFgEeOw56cxmubVJQ</stateId>
<predecessor>_-OQw0U4-EeOhD8kQDn6qiA</predecessor>
<state><name>New</name></state>
</itemHistory>
<itemHistory>
<stateId>_-OQw0U4-EeOhD8kQDn6qiA</stateId><predecessor>_9MSYgUiCEeORtsQwGYgl8A</predecessor>
<state><name>New</name></state>
</itemHistory>
<itemHistory>
<stateId>_9MSYgUiCEeORtsQwGYgl8A</stateId>
<predecessor/>
<state><name>New</name></state>
</itemHistory>
<itemHistory>
<stateId>_z2k6oMoZEeOjy4RglL53dA</stateId>
<predecessor>_oVGrUnFgEeOw56cxmubVJQ</predecessor>
<state><name>New</name></state>
</itemHistory>
</workItem>
you want the text value of the status field of each workitem change in its history...
this works
https://localhost:9143/ccm/rpt/repository/workitem?fields=workitem/workItem/%28id|summary|itemId|itemHistory/%28stateId|predecessor|state/name%29%29
returns
<workItem><id>7</id><summary>fribble</summary><itemId>_1EHXgEiCEeOJEeGE8YExBw</itemId><itemHistory>
<stateId>_IMLykcxvEeOjLf0lpIM4lw</stateId>
<predecessor>_z2k6oMoZEeOjy4RglL53dA</predecessor>
<state><name>In Progress</name></state></itemHistory>
<itemHistory>
<stateId>_oVGrUnFgEeOw56cxmubVJQ</stateId>
<predecessor>_-OQw0U4-EeOhD8kQDn6qiA</predecessor>
<state><name>New</name></state>
</itemHistory>
<itemHistory>
<stateId>_-OQw0U4-EeOhD8kQDn6qiA</stateId><predecessor>_9MSYgUiCEeORtsQwGYgl8A</predecessor>
<state><name>New</name></state>
</itemHistory>
<itemHistory>
<stateId>_9MSYgUiCEeORtsQwGYgl8A</stateId>
<predecessor/>
<state><name>New</name></state>
</itemHistory>
<itemHistory>
<stateId>_z2k6oMoZEeOjy4RglL53dA</stateId>
<predecessor>_oVGrUnFgEeOw56cxmubVJQ</predecessor>
<state><name>New</name></state>
</itemHistory>
</workItem>
Comments
1 vote
One other answer
Hi Karthik/Sam,
I have a similar requirement where I am trying to pull out history (Defect State and the date when the state was changed).
My goal is to list history for all defects that has a values "Release 8.2.05" under a custom attribute "defect.attribute.FoundinRelease".
The previous examples above passing 'id' as the parameter, how can I pass my custom attribute's value as parameter.
Here is the property of the custom attribute
<key>defect.attribute.FoundinRelease</key>
<type>smallStringValue</type>
<booleanValue/>
<integerValue/>
<longValue/>
<doubleValue>0.0</doubleValue>
<smallStringValue>enumeration.foundinrelease.literal.l11</smallStringValue>
<displayName>Found in Release</displayName>
<displayValue>Release 8.2.05</displayValue>
I have a similar requirement where I am trying to pull out history (Defect State and the date when the state was changed).
My goal is to list history for all defects that has a values "Release 8.2.05" under a custom attribute "defect.attribute.FoundinRelease".
The previous examples above passing 'id' as the parameter, how can I pass my custom attribute's value as parameter.
Here is the property of the custom attribute
<key>defect.attribute.FoundinRelease</key>
<type>smallStringValue</type>
<booleanValue/>
<integerValue/>
<longValue/>
<doubleValue>0.0</doubleValue>
<smallStringValue>enumeration.foundinrelease.literal.l11</smallStringValue>
<displayName>Found in Release</displayName>
<displayValue>Release 8.2.05</displayValue>
Comments
sam detweiler
Apr 24 '14, 12:19 p.m.1 vote
Karthik Krishnan
Apr 24 '14, 12:37 p.m.sam detweiler
Apr 24 '14, 12:39 p.m.1 vote
Karthik Krishnan
Apr 24 '14, 12:49 p.m.sam detweiler
Apr 24 '14, 1:13 p.m.Karthik Krishnan
Apr 25 '14, 4:07 a.m.