Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

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

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

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.

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?

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)

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.

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.

That’s great! Glad you figured it out! 

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira Service Management

JSM June Challenge #2: Share how your business teams became ITSM rockstars

For JSM June Challenge #2, share how your non-technical teams like HR, legal, marketing, finance, and beyond started using Jira Service Management! Tell us: Did they ask to start using it or...

318 views 9 7
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you