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
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Sarah Schuster
Posted Mar 28, 2018 in Jira Software

Can a company’s culture make or break agile adoption?

Can a new-to-agile team survive and thrive in a non-agile culture? If so, what advice would you give to those trying to be agile in a non-agile culture? What's the key(s) to success? Share your thoug...

12,046 views 15 13
Join discussion

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