RPE/PUB - finding the workitems related to an executionresult
hi folks
7.0.2SR1 ifix027. Global configurations enabled. RPE/PUB is the query mechanism.
I'm looking for an approach to find the workitems related to a given executionresult.
If I look at an existing workitem linked to an executionresult (using postman, and yes, I have oslclinks=true
and the global configuration in the query), I can see the URI for the linked executionresult. Looks like this:
I thought I might be able to ask for the linked workitems via this query:
https://host/ccm/rpt/repository/workitem?fields=workitem/workItem[(type/id='com.myco.team.workitem.workItemType.changeTask') and (auditableLinks/targetRef/uri='https://host/qm/oslc_qm/contexts/_eaWgINoFEemUbfVfPyLvQw/resources/com.ibm.rqm.execution.ExecutionResult/_sNrkcLqsEe23PO-JRm32zw')]/(targetRef/(uri|comment/name)|sourceRef/comment|name)&size=1000
But that fails with
Error 500: CRRED0135E: Illegal filter. The field 'workitem/auditableLinks/targetRef/uri' may not be used in a filter because it returns multiple values.
However - I can work around this by iterating over the workitem's links and grabbing the uri. But that leads me to the next problem. How do I resolve the id
?
This isn't a urn: kind of id. Is it possible to turn that reference into something usable in RPE?
I'd be very interested in approaches you may have regarding both questions.
thanks,
Steve
|
2 answers
You have tried to query for the linked workitems via a query, but it failed with an error message. The error message indicates that the field workitem/auditableLinks/targetRef/uri may not be used in a filter because it returns multiple values.
One way to work around this issue is to iterate over the workitem’s links and grab the URI. To resolve the ID https://host/qm/oslc_qm/contexts/_eaWgINoFEemUbfVfPyLvQw/resources/com.ibm.rqm.execution.ExecutionResult/_sNrkcLqsEe23PO-JRm32zw, you can try using the oslc_qm REST API to retrieve the execution result resource. Once you have the execution result resource, you can extract the ID from the URI and use it to query for the related workitems.
You can reference here to get more information: https://learn.microsoft.com/en-us/azure/devops/report/extend-analytics/work-item-uno online-links?view=azure-devops
https://docs.worksoft.com/WorksoftResultsUI/Viewing_Execution_Step_Results_in_Worksoft_Results_UI.htm
I hope this helps! Let me know if you have any other questions or concerns.
Comments
Steven Hovater
commented Jan 30, 12:43 p.m.
ah.. but
That's my second question. Sorry to be such a dunce, but how?
thanks!
|
Hi Steven
if your need is to "find the workitems (i suppose defect) related to a given executionresult" with RPE why dont you start from RQM?
Configure a data source with Execution Result Feed
Iterate on the Execution results and use the query
feed/entry/content/executionresult/defect
You can get something like:
Execution Result:
Related Defect: https://jazzdemo.softacus.com/ccm/resource/itemName/com.ibm.team.workitem.WorkItem/827 Execution Result: Related Defect: https://jazzdemo.softacus.com/ccm/resource/itemName/com.ibm.team.workitem.WorkItem/1197
Of course you can filter on the specific execution result, test case...
Hope it helps
Luca
|
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.