It's all about the answers!

Ask a question

OR and AND Operator in the same Query


Melanie Finke (7721520) | asked Apr 27 '12, 9:35 a.m.
Hello,

is it possible to mix OR and AND Operator in one Query?

I know how to build a Term with one Operator. My code for doing this is:


private Term getTermFromExpressions(List<Expression> expressions) {

Term term = new Term(Operator.AND);

for (Expression expression : expressions) {

term.add(expression);
}

return term;

}


Is it possible to do something like that?

(projectArea1 OR projectArea2) AND (workItemType1 OR workItemType2)

Best Regards

Accepted answer


permanent link
Sridhar Kuna (1601417) | answered Sep 19 '15, 2:01 p.m.
https://jazz.net/forum/questions/206856/how-to-join-expressions-using-term-to-get-the-specific-workitems
Melanie Finke selected this answer as the correct answer

2 other answers



permanent link
sam detweiler (12.5k6186201) | answered Apr 27 '12, 11:19 a.m.
I assume so, as the UI allows u to build a query like that

permanent link
Melanie Finke (7721520) | answered May 02 '12, 2:45 a.m.
I assume so, as the UI allows u to build a query like that


Thank you for the answer, but maybe it was the wrong question. I like to know how I do something like that.

Regards

Your answer


Register or to post your answer.