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

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.

0 votes


Accepted answer

Permanent link
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

1 vote

Comments

  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.

 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,

The identifier and name properties are different.  The name property can be changed using the RQM Reportable REST API and/or RQM UI.  However, the identifier property is immutable and not exposed in the RQM UI.  You can use the web ID (exposed in the RQM UI) in an internal ID (if supported by the resource type) in the RQM Reportable REST API.  For more information on the types of IDs (including internal IDs) supported by the RQM Reportable REST API, see https://jazz.net/wiki/bin/view/Main/RqmApi#id.

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
× 10,941
× 480

Question asked: May 12 '14, 9:12 a.m.

Question was seen: 8,254 times

Last updated: Jun 03 '14, 6:43 a.m.

Confirmation Cancel Confirm