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

Is it possible to combine "and" and "or" operations in the oslc.where clause?

 I have an olsc query that filters on resolution value. It works fine with one value, but I need to filter on multiple values of Resolution. Is this possible?


Working example:


I need to filter where= com.team.ibm.workitem.workflow.defect.resolution.r5 or com.team.ibm.workitem.workflow.defect.resolution.r9 

Is this possible?

Thanks,
Binoy

0 votes


Accepted answer

Permanent link

Unfortunately you cannot do it by using "OR", as OSLC does not allow the "OR" operator. Try "IN".

boolean_op

The boolean_op term represents a boolean operation that lets you combine simple boolean expressions to form a compound boolean expression.

The only boolean operation allowed is " and " which represents conjunction. The boolean operator " or " for disjunction is not allowed in the interests of keeping the syntax simple. The effect of " or " in the simple case of testing a property for equality with one of several values can be achieved through the use of the " in " operator. For example, the following query finds bugs with severity " high " or " medium ":

 http://example.com/bugs?oslc.where=cm:severity in ["high","medium"]

</pre>

https://open-services.net/bin/view/Main/OSLCCoreSpecQuery

Binoy D'costa selected this answer as the correct answer

2 votes

Comments

  Thanks, this worked!

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,939

Question asked: Dec 11 '17, 3:53 p.m.

Question was seen: 2,295 times

Last updated: Dec 11 '17, 9:37 p.m.

Confirmation Cancel Confirm