First worklog date

Hello everyone,

I would like to get the first date for which time has been logged on epics or issues.
Is there a way to do this?
I’m very new to EazyBI…

Thanks for your help!

Hi @nbabin

Welcome to eazyBI Community! Thanks for posting your question!

Yes, you can get the first date when time was logged on epics or issues by creating a JavaScript calculated custom field. Here’s how to set it up:
1. Create a JavaScript calculated custom field
Go to your eazyBI account settings > Source data > Import options > Account specific calculated fields, and add a new field with the following settings (check out this link in case you don’t know where to define Accoutn specific calculated fields - Account specific calculated fields) :

  • Internal name: firstwldate

  • Display name: First Worklog date

  • Data type: date

  • Measure: ✓ (check this to make it available as a measure)

Use this 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;

2. Import the data
After adding the field, run a data import to bring this information into eazyBI.

In our documentation here you can also read about the import of first worklog date. First worklog date

Best wishes,

Elita from support@eazybi.com