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

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

0 votes



2 answers

Permanent link

 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

0 votes


Permanent link

 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.

0 votes

Comments

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!

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
× 12,015

Question asked: Jan 25, 10:01 a.m.

Question was seen: 1,720 times

Last updated: Jan 30, 1:51 p.m.

Confirmation Cancel Confirm