Forums

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

Creating a JQL query

Radhika Tk October 11, 2018

Hi,

I need help in figuring out the query for combining the custom field and a system field.

Scenario

I have a Custom field, "Customer" and another field "Labels" defined in JIRA

Both the fields belong to the same project.

Now i want to combine these two fields while writing a query to get me the unresolved issues.

Here goes: 

Project = A AND resolution = Unresolved 
AND customer in ("customer 1", "customer 2") AND labels = "label 1"

I do not get the result that i need. Hope I have made myself clear.

Looking forward to responses,

Radhika

 

1 answer

1 accepted

0 votes
Answer accepted
Alexey Matveev
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.
October 11, 2018

Hello,

I can not see a condition for an issue to be unresolved. I think it should be like this:

Project = A AND customer in ("customer 1", "customer 2") AND labels = "label 1" and resolution is empty

Radhika Tk October 11, 2018
Project = A AND resolution = Unresolved 
AND customer in ("customer 1", "customer 2") AND labels = "label 1"
Radhika Tk October 11, 2018
Project = A AND resolution = Unresolved 
AND customer in ("customer 1", "customer 2")

This query alone gives me 74 issues

 Project = A AND resolution = Unresolved 
AND labels = "label 1"

This query alone gives me 8 issues

Now when I combine both, there are 0 issues  

Project = A AND resolution = Unresolved 
AND customer in ("customer 1", "customer 2") AND labels = "label 1"
Alexey Matveev
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.
October 11, 2018

It means that there are no issues like this. If you want to combine resultls of two JQL quereis, you should join both JQL queries with OR

Project = A AND resolution = Unresolved AND(customer in ("customer 1", "customer 2") 
OR labels = "label 1")
Radhika Tk October 11, 2018

Thanks Alexey, that helped!

Alexey Matveev
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.
October 11, 2018

You are welcome!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events