How to get a Count of Date changes

Hi @BRoger,

If date changes are fixed in the issue change history and available in the issue JSON object retrieved by eazyBI, then you may import this information in eazyBI as JavaScript calculated custom field.

For example, if you have some custom date field then you may use custom field definition with JavaScript like this:

[jira.customfield_xxx_changes]
name = "Number of XXX date changes"
data_type = "integer"
measure = true
javascript_code = '''
var fieldChanges = 0;
//go through issue change history items
if (issue.changelog && issue.changelog.histories && issue.changelog.histories.length > 0) {
  var histories = issue.changelog.histories;
  for (var i = 0; i < histories.length; i++) {
    var history = histories[i];
    if (history.items && history.items.length > 0) {
      for (var n = 0; n < history.items.length; n++) {
        var item = history.items[n];
        //looking for changes incustom field
        //enter the custom field name in "XXX Date"
        if (item.field == 'XXX Date' && item.from) {
          fieldChanges++;
        }
      }
    }
  }
} if(fieldChanges > 0) {
  issue.fields.customfield_xxx_changes = fieldChanges;
}
'''

For more details on how to definer a JavaScript custom field and check what data are available for eazyBI in JSON format, please, see the documentation: https://docs.eazybi.com/eazybijira/data-import/custom-fields/javascript-calculated-custom-fields.

Unfortunately, this solution won’t work for Due Date changes on Jira Server as eazyBI does not retrieve this information. In that case, you may calculate due date changes with some scripted field and then import them into eazyBI (https://docs.eazybi.com/eazybijira/data-import/data-from-jira-and-apps/jira-calculated-and-scripted-custom-fields#Jiracalculatedandscriptedcustomfields-Duedatechanges).
Related community topics on due date changes:

Best,
Zane / support@eazyBI.com