Get Requirement ID using RQMUrlUtility
Accepted answer
Hi Michal,
Have you tried using calmlinks=true, e.g. the following?:
href="https://clmlocal.ibm.com:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/BuildIntegration+%28Quality+Management%29/template/testcase/com.ibm.rqm.planning.templates.testcase.default"/><ns2:requirement summary="myReqTest" rel="validates" href="https://clmlocal.ibm.com:9443/rm/resources/_y4clM5L2EeWHbOjihWwStw"/><ns2:requirement summary="368: mySecondReq" rel="validates" href="https://clmlocal.ibm.com:9443/rm/resources/_lE5yYaT1EeW1idwB0orHlw"/></ns2:testcase>
However, this defect prevents ID from returning so you need iFix012 of 5.0.2 (it is fixed in 6.0.2) https://jazz.net/jazz02/resource/itemName/com.ibm.team.workitem.WorkItem/143653 (the defect describes the ID missing from PDF output but the same occurs from any REST API query)
Thanks,
Brett
Have you tried using calmlinks=true, e.g. the following?:
https://clmlocal.ibm.com:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/BuildIntegration+%28Quality+Management%29/testcase/urn:com.ibm.rqm:testcase:62?calmlinks=trueThat will return XML of the test case with the requirement data (ID and title) like this:
href="https://clmlocal.ibm.com:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/BuildIntegration+%28Quality+Management%29/template/testcase/com.ibm.rqm.planning.templates.testcase.default"/><ns2:requirement summary="myReqTest" rel="validates" href="https://clmlocal.ibm.com:9443/rm/resources/_y4clM5L2EeWHbOjihWwStw"/><ns2:requirement summary="368: mySecondReq" rel="validates" href="https://clmlocal.ibm.com:9443/rm/resources/_lE5yYaT1EeW1idwB0orHlw"/></ns2:testcase>
However, this defect prevents ID from returning so you need iFix012 of 5.0.2 (it is fixed in 6.0.2) https://jazz.net/jazz02/resource/itemName/com.ibm.team.workitem.WorkItem/143653 (the defect describes the ID missing from PDF output but the same occurs from any REST API query)
Thanks,
Brett
Comments
Thanks!!
Can I get the requirements attributes too?
Hi Michal,
I do not think you can get the attributes of a requirement linked to a test case using the RQM REST API - you likely need to use the RRC API https://jazz.net/wiki/bin/view/Main/RRCReportableRestAPI
Thanks