It's all about the answers!

Ask a question

OSLC REST API: Usage of wildcard in oslc.where


Peter Christmeier (1111) | asked Aug 06 '13, 5:28 a.m.
edited Aug 06 '13, 5:29 a.m.
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

2 answers



permanent link
Stephane Leroy (1.4k149) | answered Aug 06 '13, 8:14 a.m.
JAZZ DEVELOPER
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


Comments
Peter Christmeier commented Aug 06 '13, 8:39 a.m.

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


Mike Ponti commented Sep 11 '13, 11:28 a.m.

Hello Peter,

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

Thanks

Mike


Peter Christmeier commented Sep 12 '13, 9:40 a.m.

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


Mike Ponti commented Sep 12 '13, 10:37 a.m.

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

Mike


permanent link
Yuhong Yin (25123) | answered Sep 20 '13, 3:16 p.m.
JAZZ DEVELOPER
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

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.