Latest external comment date
eazyBI for Jira
Import the date when the last external comment was added to an issue in Jira Software Mangament project, excluding internal notes by agents on Jira Cloud. You can use the measure Issues with Latest external comment date to count issues by date of the latest external 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 | lastcustcomdate |
---|---|
Display name | Latest external comment date |
Data type | datetime |
Measure | ✓ |
Additional advanced settings | json_fields = ["comment"] #this line is mandatory |
Custom JavaScript code:
var commentd; var allcomments = issue.fields.comment; if (allcomments && allcomments.comments) { var comments = allcomments.comments; for (var i = comments.length - 1; i >= 0; i--) { var comment = comments[i]; // Filter comments by jsdPublic object, true for external comment, false for internal if (comment.jsdPublic) { commentd = comment.created; break; } } } return commentd;
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 code
. Keep the opening and closing quotation marks. '''
, do not delete them.
[jira.customfield_lastextcomdate] name = "Latest external comment date" data_type = "datetime" measure = true json_fields = ["comment"] #this line is mandatory javascript_code = ''' // Insert here the Custom JavaScript code '''