It's all about the answers!

Ask a question

Feed for Test artifact having not specific custom attributes defined


Benjamin Röhl (1671425) | asked Mar 03 '15, 7:00 a.m.
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?









Accepted answer


permanent link
Paul Slauenwhite (8.4k12) | answered Mar 03 '15, 8:01 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
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

Comments
Benjamin Röhl commented Mar 03 '15, 8:29 a.m. | edited Mar 03 '15, 8:31 a.m.

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.


Paul Slauenwhite commented Mar 03 '15, 9:50 a.m.
FORUM MODERATOR / JAZZ DEVELOPER

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).


Benjamin Röhl commented Mar 03 '15, 10:51 a.m.

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.



Paul Slauenwhite commented Mar 03 '15, 2:17 p.m.
FORUM MODERATOR / JAZZ DEVELOPER

The 'foobar' custom attribute MUST have a value set to be included in the filtered response.


Benjamin Röhl commented Mar 06 '15, 8:23 a.m.

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 :)


Paul Slauenwhite commented Mar 06 '15, 9:54 a.m.
FORUM MODERATOR / JAZZ DEVELOPER

Unfortunately, your work-around is the only approach at this point.

showing 5 of 6 show 1 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.