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

OSLC REST API: Usage of wildcard in oslc.where

Hello,
I am accessing ClearQuest using OSLC REST API and VB.
I’ve been trying to query the database using a wildcard (“*”) in the ‘oslc.where’ clause, u
nfortunately with no success so far.
Queries using ‘oslc.where’ without wildcards work without problem.


The scenario: I am querying for a string field called ‘Responsible_List’ containing a space separated list of permitted users in the current task, e.g. “user0 user1 user2”.
I need to determine whether the user of the current REST API session (e.g. “user1”) is part of that list.
That’s what I have tried:
oslc.where=cq:Responsible_List=""*user1*""
The query does not return an error, but a no match (i.e. total count = 0)

I’ve already read through http://open-services.net/bin/view/Main/OSLCCoreSpecQuery, but didn’t come across a matching example.


Can anybody please provide some help?
Peter

0 votes



2 answers

Permanent link
Hi Peter,

this wiki gives you some use case sample of wildcards for ClearQuest in OSLC: https://jazz.net/wiki/bin/view/Main/CqOslcV2
Check specifically the section starting by "The * character is a wildcard that expands to match all properties...".

Regards,
Stéphane

0 votes

Comments

Hi Stéphane,

The link you posted is another resource I already had checked out.
Unfortunately it does not give an example for my scenario:
I do not need to query all properties of a record using the '' as wildcard, but instead filter for a field matching a substring (in VB you can use the 'instr' function to accomplish this task).
Again my example:
field value: cq:Responsible_List="user0 user1 user2"
substring to be matched: "user1"

oslc.where=cq:Responsible_List=""user1*""
Regards,
Peter

Hello Peter,

Did you have any luck getting a wildcard string search working? I am struggling with this as well.

Thanks

Mike

Hello Mike,

unfortunately not. I managed to change my code so that I do not need to query for substrings anymore.
Still I would be interested in a solution.

Regards,
Peter

Thanks for getting back to me, will let you know if I find anything.

Mike


Permanent link
Hello

ClearQuest OSLC CM 2.0 implementation does not fully oslc.Where - wildcard (*) support on identifiers is a missing feature.

Please see the OSLC Implementation report, and please submit a RFE against ClearQuest if this is needed.

Thanks

- Yuhong Yin

Development Manager, ClearCase/ClearQuest Jazz Integrations
Email: yyin@us.ibm.com

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
× 515
× 137
× 2

Question asked: Aug 06 '13, 5:28 a.m.

Question was seen: 6,770 times

Last updated: Sep 20 '13, 3:16 p.m.

Confirmation Cancel Confirm