Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

jql Correction

Vickey Palzor Lepcha
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.
March 6, 2018

I had this scenario to merge two boards into one. Both the boards are under Project Test.

Project Test has a Field : Test_P with cascading options for this field.

I wanted to do something like this ;

project = Test AND "Test_P" in cascadeOption(21400)

+

project = Test AND "Test_P in cascadeOption(15605) ORDER BY Rank ASC

------------------------------------------------------------------------------------

I was of the assumption that using "AND" would give me a combined result - didn't work.

But some how " OR " gave me the expected result . I got my result but I know something is not right there.

project = Test AND "Test_P" in cascadeOption(21400) OR project = Test AND "Test_P in cascadeOption(15605) ORDER BY Rank ASC

1 answer

1 accepted

1 vote
Answer accepted
Aleksandr Zuevich
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.
March 7, 2018

Hi, try next:

project = Test AND ("Test_P" in cascadeOption(21400) OR "Test_P" in cascadeOption(15605)) ORDER BY Rank ASC

Vickey Palzor Lepcha
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.
March 7, 2018

Thanks Aleks - this one also gives me the same results . Can you explain what is the difference between the two ? I know they give the same result in this scenario of mine - but I know they are two different jql .

Aleksandr Zuevich
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.
March 7, 2018

They are indeed the same, due to operators precedence project = Test AND "Test_P" in cascadeOption(21400) is executed first, then project = Test AND "Test_P in cascadeOption(15605) ORDER BY Rank ASC, and then OR between these two parts. It's just more elegant to not to repeat the same statements and use brackets for groupping.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events