Forums

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

JQL Query

Matthew
Contributor
March 9, 2023

Can anyone correct the "and belongs to" syntax for the following (2) JQL queries:

project = "IT " AND issuetype = Story not in (Done, Canceled)
and belongs to Epics in (Done, Canceled)

project = "IT " AND issuetype = Epic not in (Done, Canceled)
and belongs to Initiatives in (Done, Canceled)

2 answers

0 votes
Hitesh
Contributor
March 9, 2023

I apologize for the confusion. You are correct that the in operator cannot be used with a status value. Instead, we can use the OR operator to search for issues that belong to Epics that are either done or canceled. Here's an updated query that should work:


issuetype in (Story, Task, Sub-task) AND status = Open AND ("Epic Link" IN (done) OR "Epic Link" IN (canceled))


This query should return all Stories, Tasks, and Sub-tasks that are open and belong to Epics that are either done or canceled

Matthew
Contributor
March 10, 2023

Sorry Hitesh,

It is the same result as before.

:(

Matthew

Matthew
Contributor
March 15, 2023

@Alex Koxaras _Relational_ Might you be able to advise?

0 votes
Hitesh
Contributor
March 9, 2023

Hello @Matthew 

 

The JQL would look like this.

issuetype in (Story, Task, Sub-task) AND status = Open AND "Epic Link" in (done, canceled)

 

NOTE: That the Epic Link field should be the exact name of the field in your Jira instance that links issues to epics.

 

Let me know if this helps.

 

Reagrds,

Hitesh.

Matthew
Contributor
March 9, 2023

Hi Hitesh,

I really appreciate your prompt reply :)

I confirmed "Epic Link" is the correct syntax in our Jira.

There seems to be a problem with the "in" at the end of the query, where it wants to point to a specific Epic, instead of a status:

JQLv1.jpg

Matthew
Contributor
March 9, 2023

please disregard

Hitesh
Contributor
March 10, 2023

Try to run this query as it is ands check if it is working.

 

type in (Story, Task, Sub-task) AND status = Open AND "Epic Link" in (resolved, cancelled)

Matthew
Contributor
March 15, 2023

"Epic Link" is never in either status.  It always refers to an Epic or is blank. 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
9.4.3
TAGS
AUG Leaders

Atlassian Community Events