Dear Community,
I haven't been able to find a solution for the following problem:
I want to find all tickets of type "Change Request" that needed more than 7 days from ticket creation to the first status change to status "Agreed".
This is how far I got:
issuetype = "Change Request" and status CHANGED TO "Agreed" after startOfDay("-7d")this gives me all tickets that changed to "Agreed" in the last seven days before today. What I need now is something like created("-7d") instead of startOfDay("-7d"):
issuetype = "Change Request" and status CHANGED TO "Agreed" after created("-7d")but this query does not work as the function "created(...)" does not exist.
I've also looked for a function that does date arithmetic e.g. dateRange(created, "-7d"), but no such luck.
Any help appreciated!
Thanks!
Peter
Summary of answers:
JQL has limited support for date arithmetics, and, with regard to my problem, you cannot calculate the difference between two status changes and use that difference in a comparison.
There are a few workarounds that do require some effort:
- Native Jira: create a new field for the time difference that automatically gets updated on status change. This field can then be used in a query.
- Using apps from Atlassian Marketplace, e.g.
More details below.