Skip to main content
Skip table of contents

How to compare and build a chart with 2 date fields

For example, there are 2 date custom fields Targeted Date and Actual Date.

To compare these 2 dates, you can use ScriptRunner’s dateCompare:

CODE
issueFunction in dateCompare("", "Actual Date > Targeted Date")
mchart date compare jql.png

In the gadget, select Targeted Date as the Date Field to see the number of issues that missed the targeted date:

mchart gadget missed targeted date.png

This can also be done using the resolution date and due date, to show number of issues that were resolved later than their due date:

CODE
issueFunction in dateCompare("", "resolutionDate > dueDate")
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.