All eazyBI for Jira eazyBI for Confluence Private eazyBI

Latest comment date
eazyBI for Jira

Import the date when the last comment was added to an issue. You can use the measure Issues with Latest Comment date to count issues by date of the latest comment in particular period from "Time" dimension.

Account-specific calculated field

Account specific calculated fields are defined in Source Data → Import options.

Settings for the new field

Internal name

latestcommentdate

Display nameLatest Comment date
Data type

datetime 

Measure

Additional advanced settings
json_fields = ["comment"] #this line is mandatory

Custom JavaScript code:

let comments = issue.fields.comment.comments;
if (comments.length > 0) {
  var comment = comments[comments.length - 1];
  return comment.created;
}

Global calculated field

Global calculated fields are defined in eazyBI advanced settings.

Here are the settings for the new field definitions. You should insert the JavaScript (the code given above) below the line // Insert here the Custom JavaScript codeKeep the opening and closing quotation marks. ''', do not delete them.

[jira.customfield_lastcommentdate]
name = "Latest comment date"
data_type = "datetime"
measure = true
json_fields = ["comment"] #this line is mandatory
javascript_code = '''
// Insert here the Custom JavaScript code
'''