How are Deliverable attributes accessed when returned as an itemValue?
I'm attempting to grab a Deliverable type custom attribute for defects, but am having a hard time getting the information from my query. My query currently looks, in part, like the following:
<server:port>/ccm/rpt/repository/workitem?fields=workitem[type=id]/(allExtensions[key=<customAttribute>]/(key/itemValue)
I'm close, but the <itemValue> tag inside the <allExtensions> tag does not have any content in it. I assume I need to specify the attributes of itemValue I'd like to see, but I haven't been able to find any documentation on what properties are available. I've tried accessing Deliverable attributes (like querying itemValue/name), but haven't had any success yet.
Any ideas on how I can access the Deliverable attributes that the custom attribute's itemValue are pointing to? Thanks in advance!
|
2 answers
Ralph Schoon (63.5k●3●36●46)
| answered Aug 26 '22, 4:32 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER This shows the details of a deliverable: https://jazz.net/wiki/bin/view/Main/ReportsRESTAPI#deliverable_type_com_ibm_team_wo
It should be the same, regardless of the built in or a custom attribute. The issue seems to be to get the custom attribute. I will try to have a look later.
|
Ralph Schoon (63.5k●3●36●46)
| answered Aug 26 '22, 7:15 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER edited Aug 26 '22, 7:17 a.m. Mitch, take this with a grain of salt, as I am not an expert in this reportable REST API.
I had a look at it here: https://rsjazz.wordpress.com/2022/03/02/ewm-reportable-rest-api/ and looked at your question. I spent some time looking at it on my test system and here what I found:
I create two custom attributes. One a small String and one ID custom.delivery of type deliverable.
If you use the Reportable REST API to get the work item ID, Summary and Planned for, you find that there are a lot of details in the Planned For attribute (target). E.g. use
https://elm.example.com:9443/ccm/rpt/repository/workitem?fields=workitem/workItem[id=240]/(id|summary|target/)|allExtensions/())
For target I get a bunch of attributes that I can access e.g. a name.
allExtensions returns(I believe) all data available for all custom attributes.
If I do this, I get for target (replaced brackets with [])
[target] [uniqueId]c37178080d7640dc7cfa3209e9264b7f[/uniqueId] [reportableUrl]https://elm.example.com:9443/ccm/rpt/repository/workitem/iteration/itemId/_8iPSU1pmEeukW7cqqDjAuA[/reportableUrl] [itemType]com.ibm.team.process.Iteration[/itemType] [stateId]__5b1oBlDEe2IRLgNufUBLw[/stateId] [itemId]_8iPSU1pmEeukW7cqqDjAuA[/itemId] [contextId]_8e5qfFpmEeukW7cqqDjAuA[/contextId] [modified]2022-08-11T09:05:35.994+0200[/modified] [name]Sprint 2[/name] [id]Sprint 2[/id] [archived]false[/archived] [startDate]2022-08-21T00:00:00.000+0200[/startDate] [endDate]2022-09-03T00:00:00.000+0200[/endDate] [hasDeliverable]true[/hasDeliverable] [modifiedBy][/modifiedBy] [parent][/parent] [children][/children] [children][/children] [developmentLine][/developmentLine] [iterationType][/iterationType] [/target]
And for the specific extension I get:
[allExtensions] [helperId]_QwdCQCUaEe2BF6dMHaDoGw[/helperId] [key]custom.delivery[/key] [type]itemValue[/type] [booleanValue][/booleanValue] [integerValue][/integerValue] [longValue][/longValue] [doubleValue][/doubleValue] [smallStringValue][/smallStringValue] [displayName]CustomDelivery[/displayName] [displayValue][/displayValue] [mediumStringValue][/mediumStringValue] [largeStringValue][/largeStringValue] [timestampValue][/timestampValue] [decimalValue][/decimalValue] [itemValue][/itemValue] [/allExtensions]
I am not that knowledgeable in this API and I might be missing something, but to me it looks that the custom deliverable attribute is not fully supported in the reportable REST API.
It might be better to try the OSLC API. In that API you get a link to the deliverable
[rtc_ext:custom.delivery rdf:resource="https://elm.example.com:9443/ccm/resource/itemOid/com.ibm.team.workitem.Deliverable/_HYOkuFpnEeukW7cqqDjAuA"/]
which you can follow to get the full data about the item (I checked). Unfortunately you have to deal with the complexity of OSLC Queries and OSLC in general.
Comments The forum software massacred my answer a bit. e.g. in the second link there is an asterisk missing in the () at the end.
Using itemExtensions does not provide any more details with respect of attributes. example
|
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.