How to create a report that shows an internal comment on a certain transition

Sometimes issues are transitioned over to our customers but the agent accidentally leaves an internal comment versus a customer facing comment in Jira Service Desk. How can I build a report that shows me issues where some transitioned the ticket to the customer but left an internal comment?

Hi @Sdemidow,

Issue history status transition and commenting are separate changes.
The status transitions are already imported into eazyBI (Import issue change history), but not the comments. You can also import the Internal comments in eazyBI, along with the date when and who commented on the issue.

Here are community posts on how to import comment count on issues by users and dates:

Information, whether the comment is internal or external, is not available on the issue by default, so you can update the code and add an additional check if it is internal. For this, use the getDocument function to call REST API and find the comment details; here is an example:
Last Internal comment - #2 by zane.baranovska.

When the comment count by a user is imported, you can add thsi measure to the report to see how many of the currently answered issues have internal comments and specific status transitions on the same day.

Best,
Zane / support@eazyBI.com

I have reviewed the other community post and example but I am pretty sure I am doing this wrong.

I am not sure exactly how to update the code, this was my attempt:

#Comments by internal user - Assignee
[jira.customfield_comments_byinternaluser]
name = “Comments internal by user”
data_type = “integer”
measure = true
multiple_dimensions = [“Time”,“Assignee”]
javascript_code = ‘’’
var commenta = new Array();
var allcomments = issue.fields.comment;
if (allcomments && allcomments.comments ) {
var comments = issue.fields.comment.comments;
for (var i = 0; i < comments.length; i++) {
var comment = comments[i];
commenta.push(comment.created.toString().substr(0,10) + “,” + comment.author.name + “,1”);
}
issue.fields.customfield_comments_byuser = commenta.join(“\n”);
}
if (issue.fields.comment && issue.fields.comment.comments) {
for (i=issue.fields.comment.comments.length-1; i>=0; i–) {
var commentItem = issue.fields.comment.comments[i];
var result = getDocument(“comment/” + commentItem.id + “/properties/sd.public.comment”,{ignoreErrors: [404]});
if(result && result.value) {
if(result.value.internal) {
issue.fields.customfield_lastinternalcomment=commentItem.body;
break;
}
}
}
‘’’