Forums

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

Create filter with relative date

Roms Roms
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 2, 2012

Hello,

I would like to create a filtre using jsql with a relative date to get JIRA resolved within the last 30 days, something like :

- resolved>=now()-30

Any idea ?

Thanks

10 answers

1 accepted

31 votes
Answer accepted
Thomas Schlegel
Community Champion
August 2, 2012

Hi,

try this:

resolved > -30d

Cheers

Thomas

Roms Roms
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 2, 2012

It works, thanks a lot :)

Like # people like this
Naresh Kumar
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 28, 2015

Thanks. I was looking something similar. It works.

Like Gabriel Marcopulos likes this
Chris Fouts December 14, 2015

Along the same lines, how can I create a filter for issues that have due dates between today and the next seven days, inclusive?

Radek Janata
Contributor
October 12, 2017

@Chris Fouts

duedate > now() AND duedate < 7d
duedate > now() AND duedate < 7d AND resolution is EMPTY
Like # people like this
Tarek Faham
Contributor
October 24, 2018

This is very useful. Is there a document/reference in JIRA that explains how to use this form? For example, can I use this form:

created < -1m AND duedate < 2y
Richard Cross
Contributor
March 20, 2019

You can't do that, Valid formats are:

  • 'yyyy/MM/dd HH:mm'
  • 'yyyy-MM-dd HH:mm'
  • 'yyyy/MM/dd'
  • 'yyyy-MM-dd' 

or a period format using w = weeks, d = days, h = hours, m = minutes

e.g. '-5d' or '4w 2d'.

Like Tarek Faham likes this
Susan Mulard
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 6, 2020

Thanks to you all!! Very useful information!

Khaled Arafat
Contributor
March 31, 2021

Thanks a lot ,

It worked 

 

Cheers!

2 votes
Deleted user December 5, 2017

You can also view only the recently updated issues, say in the last 4 weeks, in the following manner:

 updatedDate >= -4w
1 vote
Deleted user November 6, 2017

I am trying to create a filter for created vs resolved in 30 days   

is this correct ?

 (resolution = Unresolved OR resolution = Fixed) AND created > -30d AND resolved > -30d

Radek Janata
Contributor
November 8, 2017

If you mean issues that are both created and resolved in last 30 days, then this is the simplest notation:

created > -30d AND resolved > -30d

Only issues with Resolution set are resolved. If resolution is empty, the issue does meet "resolved" condition.

Like robin.fielding likes this
robin.fielding March 27, 2020

This helped me out a lot, thanks very much.

0 votes
1st line support KPMG
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 6, 2020

How can I filter to see request created since 2018 till now. Please advise

Radek Janata
Contributor
May 7, 2020
created > 2018-01-01
0 votes
José Agnaldo B_ de Sousa April 12, 2020

Hi, i need a query to show the tickets created greater than 6 months and less than 1 year from now.

Thanks. 

Radek Janata
Contributor
April 15, 2020
created < -180d AND created > -365d

You need to use days "d" as "m" is reserved for minutes and "M" doesn't work. See also Advanced searching - fields reference in Atlassian Documentation.

José Agnaldo B_ de Sousa April 15, 2020

Thanks.

0 votes
Yasser_Abdallah November 19, 2019

resolved > -30d

0 votes
Gabriel Marcopulos May 17, 2019

Hi,
It worked for me too.
I needed to perform a trigger that obtains issues that were in a same priority during a specific period of time and then, move them to higher priority.
Thanks a lot for all your help!
Cheers

0 votes
Deleted user October 2, 2018

I am looking for a filter to pull issues created over 6 months ago.  I tried created > -180d, created >= -6m, created >= endofmonth(-5) and none of them seem to work.  

 

I also tried using createddate vs. created, but not getting the results I am looking for.  Any ides on how to create this filter?

Urszula Forenc
Contributor
October 3, 2018

Hi,

maybe this: created <=  endOfDay(-6M)

Deleted user October 3, 2018

created <=  endOfDay(-6M) didn't work, but by making a minor change to your suggestion, it worked.  I used created<=endOfDay(-180d).  Thank you so much for your help.

Urszula Forenc
Contributor
October 3, 2018

Sometimes it works with "M", sometimes with "d", I don't get it ;)

0 votes
Urszula Forenc
Contributor
September 27, 2018

How can I create it with years? -3y doesn't work.

cdowideit
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 28, 2018

How about 36m?

Urszula Forenc
Contributor
September 28, 2018

Instead of now() I did sth like this:

project = Rec AND "App Date" < startOfDay(-3y)

Now it works great.

0 votes
Deleted user December 6, 2017

Thanks it works now !

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events