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

This widget could not be displayed.
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 Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Published Apr 22, 2018 in Jira Software

How-to setup a secured Jira Software 7.9.0 on Ubuntu 16.04.4 in less than 30 minutes

...PermissionsStartOnly=true User=www-data Group=www-data ExecStart=/opt/jira/bin/startup.sh ExecStop=/opt/jira/bin/shutdown.sh TimeoutStartSec=120 TimeoutStopSec=600 PrivateTmp=true [Install] WantedBy...

1,066 views 5 11
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