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

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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

can I query jira using a date in the past, result of an operation between 2 dates? Edited

Dear all, I would like to create a dynamic query to check which ticket were open in the past, at regular interval.

The goal is to identify trends regularly in the last X days

something like this: 
1) issuetype = Defect and status was Open on "today"
2) issuetype = Defect and status was Open on "10 days ago"
3) issuetype = Defect and status was Open on "20 days ago"
and so on... 

Thank you

1 answer

Yes, you can do this - though it's not quite 'simple' and will be somewhat dependant on exactly what you're trying to do.

I suggest first using the Basic interface for JQL date queries - it will give you a relatively easy way to piece together each of those above parts:

in the JQL query you'll be able to use  was in (open)  /  BEFORE  / AFTER / BETWEEN and date ranges (the basic interface will show you how the sytax looks when you change it back to advanced mode).

You can string them all into 1 master query through use of (query 1) OR (query 2)....etc


This is not helpful because I need to update manually the queries from time to time and this is not what I need.

In the meantime I found this option

"...and status was not closed on endofweek(-1)/endofweek(-2)/endofweek(-3)" in this way I check dynamically the week before, two weeks before and so on...

PS. I do not have the chance to use that interface, therefore I need to you an explicit query.

Thank you Chris for your help.

Suggest an answer

Log in or Sign up to answer

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