Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,639,039
Community Members
 
Community Events
196
Community Groups

Combining filters not working

Edited

Hello

 

I have 2 filters that work fine separately, but when i try to combine them they don't.  One filter keeps getting ignored.  

My filters are as follows:
Filter 1 = project1 OR project2 AND != Component A
Filter 2 = Epiclink = Epic1 AND duedate <= 4w 

I have tried every conceivable way to do this:
filter = "filter 1" AND filter = "filter 2"
filter = "filter 1" OR filter = "filter 2"
filter = "filter 1" | filter = "filter 2"

I have tried changing the order, putting everything in parenthesis both together and separately, everything in parenthesis both together and separately followed by another AND or OR to either filter.

What I'm trying to do is see everything in 2 projects except Component A and only things in Epic1 that is within 30 days of being due.

Are these just incompatible filters or something else? Filter 2 is the one that doesn't want to work.  Thanks in advance for any help.

MT

3 answers

1 accepted

0 votes
Answer accepted

project in ("Workload Automation and Data Transfer", "Messaging Platform") AND component != "ITSME-Support/Maintenance" AND status not in (Done, Closed) AND issueFunction not in issuesInEpics("issuekey=WADT-137") OR issueFunction in issuesInEpics("issuekey= WADT-137 ") AND duedate <= 30d AND status not in (Done, Closed) ORDER BY updated DESC

0 votes
Andrew Morin
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.
Jul 02, 2020

Okay I think I got what your original ask was. I am not sure which direction you were looking at for the due date. I have it looking back 30 days but you can adjust that...

 

project in ("Workload Automation and Data Transfer", "Messaging Platform") AND resolution = Unresolved OR (component is EMPTY OR component != "ITSME-Support/Maintenance") AND duedate <= -30d AND issueFunction in issuesInEpics("project = WADT AND issuekey = WADT-137") AND resolution = Unresolved ORDER BY key ASC

Hi Andrew

 

Thanks for taking a look at this.  Unfortunately its still ignoring the 30 day till due date portion.  But there is something interesting going on with your example though...

project in ("Workload Automation and Data Transfer", "Messaging Platform") AND resolution = Unresolved OR (component is EMPTY OR component != "ITSME-Support/Maintenance") 

 ran by itself doesn't work at all.. it pulls back everything in the system though JQL acknowledges that its a proper query.  Yet when ran all together with the due date half as you gave it, then this first portion works but then the due date half isn't working.

duedate <= -30d AND issueFunction in issuesInEpics("project = WADT AND issuekey = WADT-137")  ran by itself works fine.  This duedate portion of the filter, no matter how we tried it so far stops working once combined with other filters.

 

So I don't know if that's indicative of anything, but I find it interesting that you found a filter format that only seems to work if combined with further filters.  If anything it shows some weird idiosyncratic behaviors as they relate to combining filter strings giving me hope that a perfect combination might be out there to make this work.

BTW- I also tried these filters separated into their own and then combining using filter = filter1 AND filter = filter2.   It does the same thing, ignores the duedate filter.

Now I'm thinking that our Jira is just all jacked up.  Now suddenly I can't even get basic filters to work right.. like (status != done ) or status NOT IN (Done, Closed).. same if using resolved or anything else.

I'm going to have our projects reindexed to see if that helps at all.

Sachin
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.
Jul 06, 2020

Yeah, it looks like a re-indexing issue. Just try to do a full background reindexing @Oh_ Me Too_ 

Apparently I just needed a schooling on JQL.   After working with our internal Jira support we found that the old filters that i thought were not working right either were never working right or got changed.  Those were fixed with a parenthesis in the right spot.

 

The original filter eventually was made to work with project in ("Workload Automation and Data Transfer", "Messaging Platform") AND component != "ITSME-Support/Maintenance" AND status not in (Done, Closed) AND issueFunction not in issuesInEpics("issuekey=WADT-137") OR issueFunction in issuesInEpics("issuekey= WADT-137 ") AND duedate <= 30d AND status not in (Done, Closed) ORDER BY updated DESC

I feel a little better in that even these Jira specialists took a few times to get it right.  What a very unintuitive product.

 

But thanks for all the help everyone.

Sachin
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.
Jul 13, 2020

That’s great! Glad you figured it out! 

0 votes
Sachin
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.
Jul 02, 2020 • edited

Hello, can you try below filters

filter1: project in ("project1", "project2") AND component != componentname

filter2: project in ("project1", "project2") AND "Epic Link" = epiclink AND duedate <= 4w

or project in ("project1", "project2") AND "Epic Link" is not EMPTY AND duedate <= 4w

now to combine both saved filters:

filter = filter1 OR filter = filter2
or
filter = filter1 AND filter = filter2

Ah, thank you for the suggestion!  It didn't occur to me to try to change or optimize the original filters.

 

Unfortunately it didn't work, I'm getting the same results after i made the above changes to the original filters and verified that they work.: 

filter = filter1 OR filter = filter2 -result is only filter 2 works

filter = filter1 AND filter = filter2- result is only filter 1 works

Sachin
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.
Jul 02, 2020

Thank you for trying out the filters I shared. Can you share the JQL that you are using. 

You bet, I appreciate your help!

Filter 1 = project in ("Workload Automation and Data Transfer", "Messaging Platform") AND component != "ITSME-Support/Maintenance"

Filter 2=  project in ("Workload Automation and Data Transfer", "Messaging Platform") AND "Epic Link" = WADT-137 AND duedate <= 4w   (i also tried just "Epic Link" = WADT-137 AND duedate <= 4w since it gives same results)

and i tested then:

filter = filter1 OR filter = filter2
(filter = filter1) OR (filter = filter2)
(filter = filter1 OR filter = filter2)
((filter = filter1) OR (filter = filter2))

and then all again with AND instead

Sachin
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.
Jul 02, 2020

Instead of using nested filters, can you just try combing the JQL itself.

Hey Sachin

 

Yes, that was actually what I was trying to do originally.  Same kind of thing, spending hours trying every conceivable combination of ways that I could find to do it to try to get it to work right.   Then when I discovered combining filters I thought that had to be the answer. 

But trying the single filter the result/behavior was the same as the combined filters... when I used AND one filter gets ignored and when using OR the other filter gets ignored.

Sachin
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.
Jul 02, 2020

I understand, I usually don't combine filters cause it is hard to maintain them. Anyways, so when you run those filters individually you get the results you expect?

Andrew Morin
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.
Jul 02, 2020

So I am on Jira 8.5 Data Center and I have been messing around with your filters in my environment. I am finding that I cannot use the following with the component field.

project in ("Atlassian Tools Administration", "Atlassian Tools Development") AND component != AAAMMM

project = "Atlassian Tools Administration" AND component != AAAMMM  AND project = "Atlassian Tools Development" AND component != AAAMMM

project = "Atlassian Tools Administration" AND component != AAAMMM OR project = "Atlassian Tools Development" AND component != AAAMMM

Finally dug up a post that got me the results for the first filter that you are looking for. I will look at the second one in a few minutes...

project in ("Atlassian Tools Administration", "Atlassian Tools Development") AND (component is EMPTY OR component != AAAMMM)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events