Need help with a JQL query!

Michael Thompson
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 22, 2018

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
Answer accepted
Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 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)

Michael Thompson
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 22, 2018

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