It's all about the answers!

Ask a question

RPE/PUB - finding the workitems related to an executionresult


Steven Hovater (109126) | asked Jan 25, 10:01 a.m.

 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



permanent link
Patrick Slater (11) | answered Jan 30, 3:45 a.m.

 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.
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 

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

That's my second question. Sorry to be such a dunce, but how? 

thanks!


permanent link
Luca Sentimenti (112) | answered Jan 30, 1:49 p.m.
edited Jan 30, 1:51 p.m.

 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:

Hope it helps
Luca

Your answer


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