All eazyBI for Jira eazyBI for Confluence Private eazyBI

First worklog date
eazyBI for Jira

Import the date that represents the first worklog date. You can use the measure Issues with First worklog date to count issues by date of the first worklog in particular period from "Time" dimension.

Account-specific calculated field

Account specific calculated fields are defined in Source Data → Import options.

Settings for the new field

Internal name

firstwldate

Display nameFirst Worklog date
Data type

date

Measure

Custom JavaScript code:

// Check if the issue has any worklogs
if (issue.fields.worklog && issue.fields.worklog.worklogs && 
    issue.fields.worklog.worklogs.length > 0) {
  // Get the first worklog entry
  var worklog = issue.fields.worklog.worklogs[0];
  
  // Extract the date portion (YYYY-MM-DD) from the started timestamp
  if (worklog.started) {
    return worklog.started.substring(0, 10);
  }
}

// Return null if no worklogs or started date found
return null;

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 codeKeep the opening and closing quotation marks. ''', do not delete them.

[jira.customfield_firstwldate]
name = "First worklog date"
data_type = "date"
measure = true
javascript_code = '''
// Insert here the Custom JavaScript code
'''