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

Alessandro Marinelli October 22, 2020

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

1 vote
Chris Buzon
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 22, 2020

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


chrome_2020-10-22_13-46-16.png

Alessandro Marinelli October 28, 2020

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