Forums

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

Conditional search in JQL

Sahil Dhamija
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 26, 2021

I want to display some insight on dashboard where in I want to search issues based on custom field 'Environment' (have values Prod or Test).

-> If the status is Done for issue in Prod then retrieve the issue

-> if not Done in Prod then retrieve the Issue Done in Test

 

is it possible with JQL ?

2 answers

1 vote
Vikrant Yadav
Community Champion
May 26, 2021

Hi @Sahil Dhamija Try to below query  :- 

project= Test AND ( (status = Done AND Environment = Prod) or (Environment =Test AND status = Done))

 

JIRA not support conditional JQL. 

 

thanks

0 votes
Alexander Bondarev
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.
May 26, 2021

Hi, @Sahil Dhamija !

Welcome to the Community! 

We need more information about your processes... Do you create different issues to "prod" and "test" environment? Do you linking them?

What does "retrieve the issue" mean? You can show 2 different gadgets, where users will know what to do with each gadgets results(if we are talking about "Filter Result"-gadget).

As for JQL... of course you can use all fields in JQL.  

Look through the official documentation - What is advanced searching in Jira Cloud? 

Suggest an answer

Log in or Sign up to answer