Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to find the clauses of a jql query and also the logical operators between the clauses

r June 9, 2015

Hi,

I wanted to know the jql query and its related clauses

I was able to get the clause using 

 

.getClauses() //from the where clause of query

 

Now I even want to know the logical operators((Like AND OR  or AND NOT)) between the clauses..

 

How can I find out the logical operators between clauses.??

 

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Petar Petrov (Appfire)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 6, 2016

You need to walk the clause tree with a visitor - see com.atlassian.query.clause.ClauseVisitor. For the WHERE clause you should do something like this:

query.getWhereClause().accept(visitor);

where visitor is an instance of your ClauseVisitor implementation.

TAGS
AUG Leaders

Atlassian Community Events