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

Create filter with relative date

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

7 answers

15 votes
Thomas Schlegel Community Leader Aug 02, 2012

Hi,

try this:

resolved > -30d

Cheers

Thomas

It works, thanks a lot :)

Like # people like this

Thanks. I was looking something similar. It works.

Like Gabriel Marcopulos likes this

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

@Chris Fouts

duedate > now() AND duedate < 7d
duedate > now() AND duedate < 7d AND resolution is EMPTY

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

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'.

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

 updatedDate >= -4w

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

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.

Thanks it works now !

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

Instead of now() I did sth like this:

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

Now it works great.

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?

Hi,

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

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.

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

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

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Jira

Calling all Jira Cloud users! Give us feedback on our exploration of a new navigation.

Hi everyone! My name’s Matt and I’m a product manager at Atlassian. I work in the navigation & findability space for all our Jira Cloud products. We’ve been working on trying to improve the exp...

896 views 14 12
Join discussion

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