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

Feed for Test artifact having not specific custom attributes defined

Hey,

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?









0 votes


Accepted answer

Permanent link
Unfortunately, fields filtering does not support empty predicate values (see Support selection of non-empty field values for REST services (60699)).
Benjamin Röhl selected this answer as the correct answer

0 votes

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.

showing 5 of 6 show 1 more comments

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

Question asked: Mar 03 '15, 7:00 a.m.

Question was seen: 3,043 times

Last updated: Mar 06 '15, 10:03 a.m.

Confirmation Cancel Confirm