Timelines Assigned Date

Hello!

I am trying to build a report which involves calculations around when timelines are assigned to an issue. So I’m trying to get the date when a custom date field had dates assigned (the fields went from being blank to having a date in them, not the actual date of the field.) Does anyone have any advice/help? Thank you!

Hi Stevie,

eazyBI would let you import the change history for Jira date picker custom fields. And that is the step 1 you should do, ensure the history of date picker field is selected and imported from the import options page.
Once date picker field is imported, you can use a custom Javascript code in advanced settings to find the first/last date when this date picker field was updated and import that timestamp as new date into new field.

[jira.customfield_fdtlset]
name = "First date timeline set"
data_type = "date"
measure = true
javascript_code = '''
var fdtlset;
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];
        if (item.field == 'Timelines' && item.toString) {
          fdtlset = history.created.substr(0, 10);
break;
        }
      }
    }
  }
}
issue.fields.customfield_fdtlset = fdtlset;
'''

See the field name “Timelines” I used in the code (in bold). there must use the exact custom field name in the code.

Once field is defined in advanced settings, don’t forget to import the field from the import options page as measure.
After that, find the new measures “Issues with first date timeline set” and use it with “Time” dimension to count issues where the timeline was first set on the particular time period in the report.
Martins / eazyBI