Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Creating a Search Filter - Combining two fields -

Elif Alverson
Contributor
August 7, 2018

Hello, 

I am trying to create a filter which will show the tickets of;

"Exception Expiration" field will be >= 365d OR Status is changed to " Approval Notification" >=  365d .  How to combine for these requirements on the same filter?

Thanks for your help. 

 

Elif 

1 answer

1 accepted

0 votes
Answer accepted
Max Foerster - K15t
Community Champion
August 7, 2018

Hi Elif,

I'm don't understand what exactly you're trying to search for. So the "Exception Expiration" date should be at least 365 or more days in the future OR the status changed to another status "Approval Notification" in the future? Could you please explain the sense behind your search so we can maybe find a way to build a filter? Right now it will not be working that way. Additionally try and have a look at the very good documentation on JQL functions, fields and operators here: Advanced Searching

In general I guess "Exception Expiration" >= startOfDay(365) OR status changed to "Approval Notification" whatever you need here would be sufficient.

Best, Max

Elif Alverson
Contributor
August 8, 2018

@Max Foerster - K15t , 

I would like to see the tickets with the " Exception Expiration" date are 1 year or older AND the status changed to ""Approval Notification" 1 year ago or more ago in the same search/filter. Please let me know, if it is clear now. 

 

Thank you,

Elif

Max Foerster - K15t
Community Champion
August 8, 2018

Hi Elif,

thanks for clarifying, it's much better now in what timely direction we're heading here. :) So something like this should work:

"Exception Expiration" <= startOfDay(-1y) AND status changed to "Approval Notification" BEFORE startOfDay(-1y)

Elif Alverson
Contributor
August 8, 2018

@Max Foerster - K15t

 

Thank you for your quick response.

I am sorry what I meant is if  it possible to see the tickets fit both criteria ?

Tickets with "Exception Expiration" <= startOfDay(-1y) 

status changed to "Approval Notification" BEFORE startOfDay(-1y). 

I tried this one; 

STATUS != CLOSED AND status changed to "Approval Notification" BEFORE startOfDay(-1y) or "Exception Expiration" <= startOfDay(-1y) 

 

It shows me 48 tickets

 

When I try this one; 

STATUS != CLOSED AND "Exception Expiration" <= startOfDay(-1y) or status changed to "Approval Notification" BEFORE startOfDay(-1y)

 

I see 53 tickets with 5 of them are closed ones.

 

I want to be sure that the filter I am using shows me all the tickets which are not closed with the "Exception Expiration" <= startOfDay(-1y) or status changed to "Approval Notification" BEFORE startOfDay(-1y). 

 

Which one should I use?

Elif Alverson
Contributor
August 8, 2018

@Max Foerster - K15t ; 

 

When I run these filters separate  ; 

 status changed to "Approval Notification" BEFORE startOfDay(-1y) , there are 8 tickets

and 

"Exception Expiration" <= startOfDay(-1y) ; there is only 1 ticket

 

So the total number of the tickets are 9 , not 48. 

Any ideas?

Max Foerster - K15t
Community Champion
August 8, 2018

Be careful with using OR without parentheses. So what exactly do you need? 

status != closed AND

one of the following conditions?

Exception Expiration" <= startOfDay(-1y) OR status changed to "Approval Notification" BEFORE startOfDay(-1y)

Then you have to use parentheses, so:

status != closed AND (Exception Expiration" <= startOfDay(-1y) OR status changed to "Approval Notification" BEFORE startOfDay(-1y))

 

Because without parentheses you will look for either alle issues != closed and exception date one year ago or earlier

or

just for all issues status changed to "Approval Notification" one year ago or earlier. 

Elif Alverson
Contributor
August 8, 2018

@Max Foerster - K15t , 

 

Works great, thank you for your help and patience. 

Elif 

Suggest an answer

Log in or Sign up to answer