Date Functions
The dateCompare
function compares two dates on the same issue, for instance to find all issues that were updated later than the created date:
dateCompare(Subquery, date comparison expression)
issueFunction in dateCompare("project = DEMO", "created < updated")
Time Windows
Use time windows on both side of the expression. For example, if you needed to find issues resolved before or up to six days after their due date:
issueFunction in dateCompare("project = DEMO", "resolutiondate +1d < duedate +1w")
Created and Updated
Use created
or updated
to find issues based on when they were created or updated. For example, to find issues that were resolved within two weeks of creation, use:
issueFunction in dateCompare("project = DEMO", "created +2w > resolutiondate ")
Datetime Custom Fields
Use date and datetime custom fields. For example:
issueFunction in dateCompare("project = DEMO", "resolutiondate > customfield_10500")
(where customfield_10500 is the name of a 'date' custom field).
Operators
Equal to Operator
Use the equality operator =
to find issues that have been resolved on the same date that’s in a custom field:
issueFunction in dateCompare("project = DEMO", "resolutiondate = customfield_10500")
If your date contains time, equality operator won’t be useful. Use the clearTime() method described below.
Greater than or Equal to Operator
Use the greater or equal operator >=
to find issues that have been resolved on or after the same date that’s in a custom field:
issueFunction in dateCompare("project = DEMO", "resolutiondate >= customfield_10500")
Smaller or Equal to Operator
Use the smaller or equal operator ⇐
to find issues that have been resolved on or before the same date that’s in a custom field:
issueFunction in dateCompare("project = DEMO", "resolutiondate <= customfield_10500")
Not Equal to Operator
Use the not equal operator !=
to find issues that have been resolved on a different date than that’s in a custom field:
issueFunction in dateCompare("project = DEMO", "resolutiondate != customfield_10500")
Clear Time Operator
Use the .clearTime()
method to get the date part of a date
or datetime
field. The date is converted to the user’s timezone, before the date is extracted:
issueFunction in dateCompare("project = DEMO", "customfield_10500.clearTime() = duedate.clearTime()")