It's all about the answers!

Ask a question

RQM 6.0: Is it Possible to Query RQM artifacs on the basis of custom attribute value.


Naveen Tyagi (19778152) | asked May 17 '16, 1:05 a.m.
edited May 17 '16, 9:16 a.m.
I have custom attribute xxxId in Test Case and similar in TCER. I want to query all the TCERs have xxxId value 123. similar for Test case. Is there any plausibility to  implement this? Thanks

Accepted answer


permanent link
Don Yang (7.7k21114139) | answered May 17 '16, 8:44 p.m.
Hi, Naveen

If you add xxxID attribute to the TCER view setting, and then put value 123 to the filter field and save the query, it should work as expected. The same applies to test case.


Naveen Tyagi selected this answer as the correct answer

Comments
Naveen Tyagi commented May 17 '16, 11:31 p.m.

I apologies for  not posting complete question. I am doing it using OSLC/REST. I need programmatically  pulled out the TestCase/TCER using custom field value.
All the testcase/TCER  have custom_filed_1 value 123.


Don Yang commented May 18 '16, 12:48 a.m.

I tried with REST API and I can query the two TCERs which has custom attribute named 'test id' with value '123':

https://localhost:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/RQM1/executionworkitem?fields=feed/entry/content/executionworkitem[(customAttributes/customAttribute/name='test id' and customAttributes/customAttribute/value='123')]/*

The same should work for test case.


Naveen Tyagi commented May 18 '16, 4:59 a.m.

Thanks!! It works for both TCER and Test case.


Naveen Tyagi commented May 24 '16, 6:53 a.m.

Hey Don,
Need same for category. i have created one category IsXXX in Test case. which contains  only true false in drop down. I want to get all the Test cases for which IsXXX  value is true. I looked into the cheat sheet but didn't find anything for category.

on the separate note, What is the best way to use this URL in source code. I have made the variable part in the string passing in GET and then parsing for the required URL. But such a long URL doesn't look nice in the code and that too Encoded.


Don Yang commented May 24 '16, 8:11 p.m.

Hi, Naveen

Regarding Category, API suggests the below syntax:

<feedUrl>?fields=feed/entry/content/testplan[title='test plan title']/(title|description|category[@term='category type name' and @value ='category value'])
Include the title, description, category term, and category value properties of the test plan(s) with a title property equal to 'test plan title' and a category property with a term property equal to 'category type name' and a value property equal to 'category value'.
You may want to give it a try.

For using URL in source code, I am not sure what could be the best way. you can have a new post asking for inputs from the community.
Thanks


Naveen Tyagi commented May 25 '16, 2:59 a.m.

Thanks Don. But i think this query needs a lot more parameters  title, description, category term, and category value properties of the test plan. Whereas i only have category name and value(true/false) on the basis i want to pull out the Test Cases.
==> All the test cases for catogery_Name value is true.


Don Yang commented May 25 '16, 3:31 a.m.

you need to edit the query for testcase and only to list anything you prefer. it can be like:
<feedUrl>?fields=feed/entry/content/testcase/category[@term=' catogery_Name' and @value ='true']


Naveen Tyagi commented May 25 '16, 5:12 a.m.

Used it with Category name and value and hit in browser but getting all the test cases for Categor_Value true,false and unassigned. 


Naveen Tyagi commented May 25 '16, 5:15 a.m.

You sir are awesome.
something was extra in the Query but now working file. Thanks.

showing 5 of 9 show 4 more comments

Your answer


Register or 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.