Number of worklogs by user

Hi,
I’m trying to create a table where I can see how many worklogs a user made in JIRA tasks for a certain period.

image

I tried code from this link Time Tracking Reports - number of time record - #2 by zane.baranovska but the number is only displayed for all users.

# Count of worklogs in each period by author
[jira.customfield_work_log_count] 
name= "Worklog item count" 
data_type = "integer" 
measure = true
multiple_dimensions = ["Time","Logged by"]
javascript_code=''' 
var worklognum = new Array;
var author = "";
issue.fields.worklog.worklogs.forEach(function(worklogitem){
  if (worklogitem.author) {
    author = worklogitem.author.key;
  } else {
    author = "(none)";
  }
  worklognum.push(worklogitem.started.toString().substr(0,10) + "," + author + "," + 1);
})
if (worklognum) {
  issue.fields.customfield_work_log_count = worklognum.join("\n");
}
'''

Thank you for your help.

Hi @TomasS

Is the report working as expected when removing the “Category” dimension from the Rows section and only using the “Logged by” dimension?

Also, what type of field is the “Category” field in your Jira? Is it a single or multi-value field?

Thanks!
​Best regards,
​Nauris / eazyBI support

Hi @nauris.malitis ,
Category is a insight custom field in JIRA. I need to make a report on a certain category of this field.

It is a multi-valued field. In most cases, one value is selected.

Hi @TomasS

Sorry for the late reply.

In your Advanced settings code you would have to map the Worklog item count also to the “Category” dimension, but it is not possible to map data to a multi-value dimension.

​Best regards,
​Nauris