Date
dateCompare
The comparison operators available in this function are <
, >
, <=
, >=
, =
. The use of the "!=
" operator when using the dateCompare
function is only supported on ScriptRunner for Jira Cloud. However, you can achieve the same result by using "=
" and negating the JQL clause itself in ScriptRunner for Jira Server/DC.
This function lets you compare two dates on the same issue, for instance to find all issues that were resolved later than their due date:
You can use time windows on either side of the expression. Eg to find issues resolved before or up to one week after their due date:
You can also use created
and updated
. To find issues that were resolved within two weeks of creation, use:
In addition, you can use the "fields" firstCommented
, and lastCommented
(reindex required after first install). To find issues that had not been commented within one week of creation:
You can also use date and datetime custom fields. Example:
where Delivery Date
is the name of a date
custom field.
You can also use the equality operator =
to find issues issues that have been resolved on their delivery date:
Performance
Performance will be proportional to the number of issues that have both fields in the date comparison set. If this is a very high number of issues (greater than 50k) you can filter some out: eg:
lastUpdated
Finds issues by the user who last updated them. Example, find all issues that were last updated by members of the Developers role:
Last updated comprises the following actions:
edits
state changes
adding/removing links, labels etc
commenting