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

OSLC/REST link RM requirement to Test Case in QM

I am having a similar issue as noted in How to link test case to requirement using OSLC API - Jazz Forum but I'm not sure a real solution was found. 

I am using the following methodology to PUT to the requirement but it only works from the RM side... No link appears in QM side. 

GET
URL = server_url>/rm/resources/<requirement_externalId>
HEADER = {"Content-Type": "application/rdf+xml", "OSLC-CORE-Version": "2.0"}

Add a validatedBy element to the xml returned
<oslc_rm:validatedBy rdf:resouce="<oslc url to testcase>"

POST
URL = server_url>/rm/resources/<requirement_externalId>
HEADER = {"Content-Type": "application/rdf+xml", "OSLC-CORE-Version": "2.0", If-Match": "<eTag from GET>"}

Any suggestions is appreciated. 

Thanks

1 vote

Comments

With configuration management enabled links are stored at the 'from' end: a Validated By link is from a QM resource to a RM requirement, so it's stored at the QM end - hence you have to update (PUT) the QM resource with the link, not the RM end.


Your question mentions both PUT and POST - you must use PUT to update the resource in QM - a POST is basically used for creating a new thing.

What would the link on the qm side look like then? It doesn't even show any links for me without using the OSLC get of the test case. 

This is untrue, have you tried? I just went into a requirement in a module and added a validated by to/from a new test case. From the Test Case I got the URI from the link hover.


I performed an OSLC GET on the URI using RESTClient and I reviewed the response body. It contains a oslc_qm:validatesRequirement  link back to the requirement.





 Note my test runs on a configuration management not enabled system. If you have that enabled, you would have to make sure to open the correct version of the items in the correct context.



One answer

Permanent link

Backlinks are not automatically created when using the API. You must add the validatesRequirement element to the associated versionedtestcase and perform the PUT on it.

1 vote

Comments

 AFAICT this is nothing to do with "backlink"s - the ValidatesRequirement link is always from a test case to a requirement - OP is creating the "forward" link and must do this by PUT on the test case. DOORS Next will find this link by querying LDX and display it as a Validated By when the requirement is examined in DOORS Next.

Is it possible that there is a different behavior when the project areas are configuration enabled? 

In my simple not configuration aware set up , I find the links in both items. E.g. I find 

 <oslc_rm:validatedBy rdf:resource="https://elm.example.com:9443/qm/oslc_qm/contexts/_9rYEoFpmEeubKv3DLU7kgg/resources/com.ibm.rqm.planning.VersionedTestCase/_KbDVcbppEey-aqHj2wGmUA"/>


in the requirement and  


in the test case.

If global configuration management is enabled, the link is only maintained in the QM element.  

<oslc_qm:validatesRequirement rdf:resource="https://elm.example.com:9443/rm/resources/BI_FwI_4e3hEeuiQ9NS4IrdCw" />

There is no "back link" stored in DNG in this case. Instead LDX is used to look up the QM element with the link.

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
× 516
× 29

Question asked: Apr 11 '22, 12:47 p.m.

Question was seen: 1,602 times

Last updated: Apr 13 '22, 4:03 a.m.

Confirmation Cancel Confirm