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

How do I test for "Contains" in an "OSLC.Where" query?

There is a wiki article explaining the usage of the OSLC query mechanic for fetching data from RTC. This article can be found here:


In the article, it is claimed that you can search for work items where the summary contains a particular string by using the argument:
dcterms:title="adoption*"
I tested this using my own project area and it doesn't work as advertised. This kind of query will only return summaries that END WITH that string. So for example, consider two hypothetical work items with summaries as follows:

1) Pursue adoption services.
2) adoption is something worth funding

The second work item will be found by the query, but the first one will not be. So rather than being a "contains" query, this seems to be a "starts with" query.

There is another example on the same page that implies you can do a "contains" search without any sort of wildcard.
Example 7 - Work Items containing 'NPE' and selecting only summary, id in the result
oslc.searchTerms "NPE"
The sample output for Example 7 includes work items that only include "NPE" as a portion of the Summary. However, in my testing this only returns exact matches.

Intuitively, if you use the '*' wildcard for the "Starts With" search, then you would logically think that you could simply put it at the beginning of the query to find work items that "End With" a particular string. However, this returns a 301 error. It would appear that asterisks at the beginning of the query string are not permitted.

How do you actually do this? That wiki page is incorrect.

0 votes



One answer

Permanent link

 Sorry I can't try this right now, but OSLC Query specification indicates the * wildcard matches any property and % and _ are used for matching in string literals. Try that. 

0 votes

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,952
× 516

Question asked: Feb 05 '20, 10:33 a.m.

Question was seen: 2,145 times

Last updated: Feb 05 '20, 10:56 a.m.

Confirmation Cancel Confirm