Filter creation question.

Shawn Wallace June 21, 2021

I'm having trouble creating a JQL filter that will pull historical issues. I need to pull issues for 2 inactive members for a 3 year range 2005-2008. Is this possible? I've tried but can't get any results.

1 answer

1 accepted

0 votes
Answer accepted
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 21, 2021

It should be, what filter do you have at the moment?

Something like the below?

assignee = 'dave (inactive)' and created >= 1 Jan 2005 and created < 1 Jan 2009

Shawn Wallace June 21, 2021

Hi Nic. More like this. 

Project = LTM AND status = closed AND assignee not in (membersOf(“jira-software-users”))

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 21, 2021

Your inactive users may be just inactive, and not really removed from the group.   Also, inactive users don't show in a lot of places.

Could you re-test your search but explicitly name one of your people who has left - Project = LTM AND status = closed AND assignee = 'dave (inactive)'

Joshua Sneed Contegix
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.
June 21, 2021

HI Shawn,

The use of "assignee not in" is unclean and likely limits the query to more than the two users as indicated. Try something like this:

Project = LTM AND status = closed AND assignee not (user1,user2) AND Created >= 1 Jan 2005 AND created < 1 Jan 2009

 Cheers.

Shawn Wallace June 21, 2021

Hi Joshua. Thank you for responding. When I try your filter i get an error that says "The value 'Wallace (inactive) does not exist for the field 'assignee'. I get the same error when i try your filter as well Nic.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 21, 2021

Ok, I think you're on a version of server that does not allow for lookups or full searches for (or against) inactive or deleted users.

You can still force it though.  Looking at our system, I've got a search for "every issue in Jira", and depending on the sort, I can see an issue assigned to someone we will call "Bob Edna".  

Bob left years ago, and reassigned active work, so it's a closed issue, but when it lists the asssignee it shows "Bob Edna [X] Inactive" (the X is historical, Bob actually left us before Jira implemented the ability to show inactive, so we added [X] to people to show they'd gone).

Now, if I type "assignee = B" into the search, Jira starts listing people with names starting B, but Bob is not on that list, even when I've gone to Bob (several other Bobs are listed!). 

What I had to do for Bob was work out their user id as Jira is still holding for historical reasons.  Going back to my long search, I could see Bob in the assignee column, so hovering over their display name popped their user account details, which includes an email address, but most importantly, the id of "bobedna".

Assignee = bobedna 

works fine.  It won't autofill to help you find Bob, but if you know that your two people have usernames of alice and charlie, then 

Project = LTM AND status = closed AND assignee in (alice, charlie)

should do it.

Like Joshua Sneed Contegix likes this
Joshua Sneed Contegix
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.
June 22, 2021

Hi Shawn,

Like Nic said, try using the primary ID (likely the raw username) even though it will not produce suggestions. I verified on one of my production systems. Its also worth noting that I had "assignee not (u1,u2)" in my suggested query and it should have been "assignee in (u1,u2)," my apologies for that mistake. Cheers!

Shawn Wallace June 22, 2021

Thank you both for your input! I'll try this asap.

Suggest an answer

Log in or Sign up to answer