Hello,
I am trying to model changes in original estimate hours.
In the EazyBI model, the measure is grouped by issue creation dates.
How can I change or create a new measure which could be grouped by issue due dates?
I have the following definition for the custom field in advanced settings:
[jira.customfield_org_est_duedate]
name = "Original estimated hour by duedate"
data_type = "decimal"
measure = true
multiple_dimensions = ["Time"]
split_by = ","
javascript_code = '''
ortimeEstimateDueDate = new Array();
if ((!ortimeEstimateDueDate || !ortimeEstimateDueDate[0]) && issue.fields.timeoriginalestimate && issue.fields.duedate ) {
ortimeEstimateDueDate.push(Date.parse(issue.fields.duedate) + ',' + parseInt(issue.fields.timeoriginalestimate)/3600);
}
if (ortimeEstimateDueDate) {
issue.fields.customfield_org_est_duedate = ortimeEstimateDueDate.join("\n");
}
'''
My hope is that he could "internally" link the fact table and Time dimension table through the due date which does not happen.
What am I missing?
Many thanks for any help.
Hello,
You are very close to the correct solution here.
You used correct principle to import this new calculated custom field as a meausre with option multiple_dimensions time. The similar option would be using multiple_dates = true
You can use any of them though.
eazyBI require custom field values in this format to map measure correctly to time dimension:
date1,numeric value1
date2,numeric value2
You are using Date.parse(issue.fields.duedate) and it retrieves you timestamp of due date instead of date. Please remove the Date.parse from the code and it should work.
Daina / support@eazybi.com
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.