Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Need help writing Jira Insight advanced query

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 Leader Feb 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...

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
Community showcase
Published in Marketplace Apps & Integrations

Why you should move agile planning to Lucidspark’s digital whiteboard

During my 17 years as a coach, mentor, and trainer of Agile teams, I’ve participated in hundreds of Agile planning meetings. The end result was a wall of backlog items annotated by an explosion of co...

91 views 0 5
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you