Feed for Test artifact having not specific custom attributes defined
I try to build a feed query with RQM API.
The following feed should show me all Test Plans which have not defined a value for the specific 'foobar' custom attribute:
/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/CarLightTests/testplan?fields=feed/entry/content/testplan/customAttributes/customAttribute[name='foobar' and value='']The query is currently not url encoded. The last path (beginning with 'customAttribute...') will be encoded when executed.
In my setup there are 2 test plans. 1 has the 'foobar' defined with value '1' and the other with no value.
Requesting the feed the result contains no test plan.
If I request the feed with value set to '1', the one and only test plan is contained in result.
So the question is, I defined the query feed wrong or is there a bug in RQM's evaluation?
Accepted answer
Comments
As a workaround I would like to build a query to get all test plans with the specific custom attribute 'foobar' included. I already tried to figure it out with the help of the wiki but with no success.
How would it look like?
I could then filter it by myself.
Try:
?fields=feed/entry/content/testplan/customAttributes/customAttribute[name='foobar']
If RQM 5.0+, try adding the strictFields=true parameter to determine any malformed fields paramters (see https://jazz.net/wiki/bin/view/Main/RqmApi#strictFields).
I tried your suggestion with no success. It's same result using strictFields or not.
The result only contains the test plan with the defined value for 'foobar' custom attribute.
The 'foobar' custom attribute MUST have a value set to be included in the filtered response.
So next workaround would be to make two queries.
The first retrieves all test plans and the second only the test plans which have the custom attributes.
Finally, having all test plans without the 'foobar' custom attribute, I've to retain all test plan not present in second retrieval.
Other suggestions are welcome :)
Unfortunately, your work-around is the only approach at this point.