I am trying to create some Issue Filters in JIRA based on CreateDate
.
The only date/time function I can find is Now()
and searches relative to
A friend who is a JIRA wiz showed me that you can actually pass the filter (escaped) as a jqlQuery
parameter to JIRA via URL:
http://hostname/secure/IssueNavigator!executeAdvanced.jspa?clear=true&runQuery=true&jqlQuery=created%3E='2010-05-31%2000:00'%20AND%20created%3C='2010-06-06%2023:59'%20ORDER%20BY%20created%20ASC
I created an ASP.Net page which generates the URLs based on an offset week or month.
Everybody's happy!
We're using Jira 6.2 and I use this query:
updatedDate > startOfDay(-1d) AND updatedDate < endOfDay(-1)
to return all of the issues that were updated from the previous day. You can combine with whichever queries you want to return the appropriate issues for the previous day.
I run it like this -
created > startOfDay(-0d)
It gives me all issues created today. When you change -0d
to -1d
, it will give you all issues created yesterday and today.
Just for the sake of keeping the information up-to-date, with at least JIRA 7.3.0 (maybe older as well) you can explicitly specify the date in multiple formats:
'yyyy/MM/dd HH:mm'
;'yyyy-MM-dd HH:mm'
;'yyyy/MM/dd'
;'yyyy-MM-dd'
;Example:
updatedDate > '2018/06/09 0:00' and updatedDate < '2018/06/10 15:00'
Check out startOfDay([offset]). That gets what you are looking for without the pesky time constraints and its built in as of 4.3.x. It also has variants like endOfDay, startOfWeek, startOfMonth, etc.
You would expect that this is easily possible but that seems not be the case. The only way I see at the moment is to create a user defined JQL function. I never tried this but here is a plug-in:
http://confluence.atlassian.com/display/DEVNET/Plugin+Tutorial+-+Adding+a+JQL+Function+to+JIRA