Forums

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

Need help writing Jira Insight advanced query

Cooke_ Terri February 10, 2021

I need some help writing a seemingly complex query that combines 3 separate queries. 
My ultimate goal is to identify all asset records that are missing data for required fields in our Jira Insight.

These are the required fields:
Country
Assigned To
Email ID
Asset Status
Cost
Depreciated Cost
Purchase Date
PC Type
Location

My query for these required fields: 
"Country" IS empty OR "Assigned To" IS empty OR "Email ID" IS empty OR "Asset Status" IS empty OR "Cost" IS empty OR "Depreciated Cost" IS empty OR "Purchase Date" IS empty OR "PC Type" IS empty OR "Location" IS empty

Now for the complex part.....
There are 2 countries (India & Nepal) that have an additional required field - "Financial ID".
I've been able to write a query each for India & Nepal (below).

2nd query (India):
"Financial ID" IS EMPTY AND "Country" IN ("India") OR "Assigned To" IS empty OR "Email ID" IS empty OR "Asset Status" IS empty OR "Cost" IS empty OR "Depreciated Cost" IS empty OR "Purchase Date" IS empty OR "PC Type" IS empty OR "Location" IS empty

3rd query (Nepal):
"Financial ID" IS EMPTY AND "Country" IN ("Nepal") OR "Assigned To" IS empty OR "Email ID" IS empty OR "Asset Status" IS empty OR "Cost" IS empty OR "Depreciated Cost" IS empty OR "Purchase Date" IS empty OR "PC Type" IS empty OR "Location" IS empty

Can anyone suggest 1 query that combines all 3?

Thanks in advance!

1 answer

1 accepted

0 votes
Answer accepted
Hana Kučerová
Community Champion
February 10, 2021

Hi @Cooke_ Terri ,

welcome to the Atlassian Community!

Hopefully I got it right, but I would do something like:

("Assigned To" IS EMPTY OR "Email ID" IS EMPTY OR "Asset Status" IS EMPTY OR "Cost" IS EMPTY OR "Depreciated Cost" IS EMPTY OR "Purchase Date" IS EMPTY OR "PC Type" IS EMPTY OR "Location" IS EMPTY) OR ("Country" IN ("Nepal", "India") AND "Financial ID" IS EMPTY)

Find all records with empty fields (for all countries including Nepal and India) and add also the ones for Nepal and India, which have Financial ID empty...

Cooke_ Terri February 11, 2021

Hana - you are a lifesaver!  Thank you - huge sigh of relief!  :)

Like Hana Kučerová likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events