How to filter issues which has been commented by certain user

I have a Bot user in Jira which will comment on some issues, I want to filter all the issues has been commented by this particular user.
I can make it in JQL " issuekey in updatedBy(“bot_name”) ", how can I do it in eazyBI ? Can I make it without import all the comments.

I will be much appreciated for any Ideas.

Hi @Lee ,

If that is an absolute category of whether the issue is commented by the specific user or not, you might create a new JavaScript calculated customfield dimension that would scroll through issue comments during the data import and identify if there is any comment by that user.

​Please read more about creating new calculated customfields here- Account specific calculated fields.

The actual JS code might be as follows.

var found = null;
if(issue.fields.comment && issue.fields.comment.comments &&
   issue.fields.comment.comments.length>0){
   for (var i=0; i<issue.fields.comment.comments.length && !found;i++){
     if (issue.fields.comment.comments[i].author &&
         issue.fields.comment.comments[i].author.key &&
         issue.fields.comment.comments[i].author.key == "<user key for the bot user>"){
       found = "yes";
     }
   }
}
if (found){return "bot commented"}
else {return "no bots spotted"}

​You might then import this customfield as a separate dimension and use it in reports to see the presence of the bot in the comments.

​Regards,
​Oskars / support@eazyBI.com

1 Like

The calculated customfield link is useful! The javascript works, Thanks a lot!