Time Tracking Reports - number of time record

Hello,

I would be interested in making a report with the number of time records of a task, the objective is to identify tasks of several hours with short time dedications.
For example: issue, hours spent, num worklogs, worklogs> 30min

It’s possible?

Hi @Marti_Sole,

eazyBI retrieves data from worklogs and represents them as Hours spent. But there is no measure representing the count of worklog items.

To get the count of worklogs you may use JavaScript calculated custom field and create new measures Worklog item count.

In eazyBI advanced settings, add custom field definition with JavaScript code to calculate worklog items for each issue:

# 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");
}
'''

To get the count of significant worklogs (more than 30 minutes), you may add another JavaScript calculated custom field Worklog items over 30 min count

# Count of worklogs over  30 minutes
[jira.customfield_work_log_over_30] 
name= "Worklog items over 30 min 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.timeSpentSeconds > 1800) { //logged time less than 30 min (1800 sec)
    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_over_30 = worklognum.join("\n");
}
'''

Please read more on how to add JavaScript calculated custom fields:
https://docs.eazybi.com/eazybijira/data-import/custom-fields/javascript-calculated-custom-fields

After importing new calculated measures for worklog items count, you may build a report. Set Issue dimension on rows and newly calculated measures, as well as measure Hours spent, on columns (see picture below)

Best,
Zane / support@eazyBI.com