Forums

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

How to build JQL query for below condition?

Bablu Mandal
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!
September 5, 2023

Hi,

Can anyone help me in building JQL query for below condition.

 

project = ABCD AND issuetype in (Task , Test, "Test Set") AND 

where Issuetype=Task AND status="In Packaging" AND

Issuetype=Test AND Status != Closed

ORDER BY status DESC

1 answer

1 vote
Trudy Claspill
Community Champion
September 5, 2023

Hello @Bablu Mandal 

Welcome to the Atlassian community.

I am unclear about what you want to achieve with this JQL. Can you please try to explain it?

Using the issueType field as one of you criteria specifies which types of issues you want to include. You have already specified in the first line that you want all issues of type Task, Test, and Test Set.

Why are you using issueType again in the JQL and specifying only one type of issue?

1. Do you want to retrieve the Task issues only if their status is "In Packaging" and not include any other Task type issues?

2. Do you want to retrieve the Test issues only if their status is not Closed, and not include the Test issues that are Closed?

3. Do you want to also retrieve all Test Set type issues, regardless of their status?

If 1, 2, and 3 are true then the JQL you need is

project = ABCD AND

(issuetype = "Test Set" OR

(Issuetype=Task AND status="In Packaging" OR

(Issuetype=Test AND Status != Closed))

ORDER BY status DESC

Bablu Mandal
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!
September 6, 2023

Hi @Trudy Claspill 

I am trying to build a query where there will be 3 issuetypes (Test Set, Task and Test) and the list will further be filtered using the Task should be with "In Packaging" status and then the result will further be filtered using Test associated to the Tasks should be with status as Closed.

Trudy Claspill
Community Champion
September 7, 2023

The query I provided doesn't take into account any associations between the issue types. How are Tests associated to Tasks?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events