Need help with a JQL query!

Hello all,

I've been pulling my hair out trying to get a particular JQL query to filter the proper data. I am trying to get accurate data moved into eazyBI by adding a limiting JQL statement to the import options. I have been testing in the JIRA Search advanced filter but keep getting unexpected results.

(JIRA Server 7.5.2)

GOAL:

All tickets currently open and assigned to a member of the mimo-full-team group, or all tickets that were Closed or Resolved by a member of that group and were not duplicates or labelled as 'junk'. Only show results from 1-Jan-2016 to today.

JQL QUERY:

(assignee in membersOf(mimo-full-team) OR (status changed to (Resolved, Closed) by membersOf(mimo-full-team) AND (labels not in (junk) OR resolution != Duplicate))) AND createdDate >= "2016/01/01"

I have also used this alternate query:

(assignee in membersOf(mimo-full-team) OR (status changed to (Resolved, Closed) by membersOf(mimo-full-team) AND (labels not in (junk) AND resolution != Duplicate))) AND createdDate >= "2016/01/01"

RESULT:

Everything is correct except I still see resolved tickets with the 'junk' label.

MY QUESTION:

How do I format the query so that I filter out issues with the 'junk' label?

1 answer

1 accepted

1 vote
Jack Brickey Community Champion Jan 22, 2018

let's bring the junk piece out outside along w/ created date and see what happens.

(assignee in membersOf(mimo-full-team) OR (status changed to (Resolved, Closed) by membersOf(mimo-full-team) AND resolution != Duplicate))) AND createdDate >= "2016/01/01" AND labels not in (junk)

Hmm, there was an extra close parenthesis after 'resolution !=Duplicate', but oddly when I fixed that the junk labels were gone, but the results displayed Duplicate issues. 

Weird, but it led me to the fix! I rearranged where my parentheses were located and finally go no dupes and no junk!

CORRECT JQL:

(assignee in membersOf(mimo-full-team) OR status changed to (Resolved, Closed) by membersOf(mimo-full-team)) AND resolution != Duplicate AND createdDate >= "2016/01/01" AND labels not in (junk)

 

Thank you for kickstarting my brain again Jack!

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published May 21, 2018 in Jira Software

How large do you think Jira Software can grow?

Hi Atlassian Community! My name is Shana, and I’m on the Jira Software team. One of the many reasons this Community exists is to connect you to others on similar product journeys or with comparabl...

1,026 views 7 18
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you