Latest comment author name
eazyBI for Jira
Import the display name of the author for the latest comment added to an issue, *if user hasn't restrict it in Jira Cloud
Account-specific calculated field
Account specific calculated fields are defined in Source Data → Import options.
Settings for the new field
Internal name | latestcomauthname |
---|---|
Display name | Latest Comment author name |
Data type | string |
Dimension | ✓ |
Additional advanced settings | json_fields = ["comment"] |
Custom JavaScript code:
let comments = issue.fields.comment.comments; if (comments.length > 0) { var comment = comments[comments.length - 1]; if(comment.author && comment.author.displayName) return comment.author.displayName; }
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_latestcomauthname] name = "Latest comment author name" data_type = "string" dimension = true json_fields = ["comment"] #this line is mandatory javascript_code = ''' // Insert here the Custom JavaScript code '''