Accessing custom attributes definition from rest api in rqm test cases
Using rqm api 4.0, I would like to add a value to a custom attribute, knowing only its name.
I can post the the new value of the test case, but for the custom attribute, I need to know not only its name and value, but also its identifier and type (which are also not obvious to get from RQM GUI...)
I didn't find a way to retrieve through the api, from a given project, the list of defined custom attributes and their details.
Can I have access to this custom definition ?
Thanks for help.
|
Accepted answer
Unfortunately, the RQM Reportable REST API does not support a custom attribute resource type (see https://jazz.net/wiki/bin/view/Main/RqmApi#Resources_and_their_Supported_Op). Since the custom attribute identifier/name/value properties are required (see https://jazz.net/products/rational-quality-manager/api-doc-4.0.6/schemas/qm_xsd/elements/customAttributes.html#a4), I would suggest creating a custom attribute and test case in the RQM UI and GET the testcase resource to see the required custom attribute identifier/name/value properties. For example:
<ns2:testcase> ... <ns2:customAttributes> <ns2:customAttribute required="true" type="SMALL_STRING"> <ns2:identifier>Sample_custom_attribute</ns2:identifier> <ns2:name>Sample custom attribute</ns2:name> <ns2:value>Sample custom attribute value</ns2:value> <ns2:description/> </ns2:customAttribute> </ns2:customAttributes> ... </ns2:testcase> Arnaud Bouzy selected this answer as the correct answer
Comments
Arnaud Bouzy
commented May 13 '14, 9:11 a.m.
Yes. This was actually my fear.
Any update coming on this with RQM v5 ?
Thanks anyway for your quick answer
I could not find a related enhancement. Please open a RQM enhancement.
Arnaud Bouzy
commented Jun 03 '14, 5:10 a.m.
Hi Paul,
Coming back to this, I just realized that there seems to be no simple way to get the attribute identifier from the attribute name (if the name changes, the identifier is kept identical, which seems a good idea :-)).
But there also seems to be no way to see, on a user point of view, from the GUI, what is this identifier. So as there is no way to get that from the API, there is no way to get it from the application... How can I find it ? I'm stuck here...
Hi Arnaud,
|
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.