How to update custom attribute value of test case in RQM through OSLC?
Hi all,
3 answers
Hi Anurag, I think it would be easier if you post the final xml that you are sending. Also include if you can the version are you using (6.0, 6.0.1, etc).
Comments
Thanks Elohim Arranaga for your valuable efforts. Now I am able to update custom attributes but single attribute is updates at single time. I want to update all custom attribute at single time. Can you please suggest way
Hi Anurag, you can send multiple entries, one for each custom attribute you need to update in a single put request for a resource (in this scenario, your test case). If they are not updating please follow up with support to open up a defect because that is not the expected behavior.
Thanks @Elohim Arranaga ...my requirement is I need to update custom attribute of custom test case template which I created. There are multiple custom attributes but when I am trying to update all only one attribute is updated. I create multiple one put request for each custom attribute. Can you tell me please what is wrong?
Hi Anurag, you can follow up with support on this problem, if you are sending updates for all the attributes in the http request and only one is being updated then we have a potential defect, you need to open up a ticket for support so we can investigate the problem more thoroughly.
Comments
Hi @Elohim Arranga Now problem is quite solved. i can update 2 custom attributes at a time. But when I tried two to update third custom attribute, third value can updated in RQM successfully, but it deletes my first two values only third value is updated.
Hi @Elohim Arranga Thanks for your reply I pasted my code below for custom attribute, note "ecu" is my custom attribute: See I put two custom attribute in map and then update it in single operation, Can you please see the code and guide me whats's wrong in code?
QName testCaseSymptom = new QName("https://d-9376:9443/qm/oslc_qm/contexts/_KrqUoMkQEeeeX6RO5KtLzA/shape/resource/com.ibm.rqm.planning.VersionedTestCase#","Name", "Name");
Map<QName, Object> customAttribute = new HashMap<QName, Object>();customAttribute.put(testCaseSymptom, "Rishi");customAttribute.put(testRecordIdQname ,"xyz");testCase.setExtendedProperties(customAttribute);ClientResponse updateResourceResponse = null;ClientResponse response = null;response = client.getResource(testCase.getAbout().toString(), OslcMediaType.APPLICATION_RDF_XML);String etag = response.getHeaders().getFirst(OSLCConstants.ETAG);System.out.println("Etag :"+etag);updateResourceResponse = client.updateResource(testCase.getAbout().toString(), testCase,OslcMediaType.APPLICATION_RDF_XML, OslcMediaType.APPLICATION_RDF_XML, etag);