Original estimate hours grouped by issue due dates

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.

1 answer

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

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Oct 11, 2018 in Marketplace Apps

You + one app + a desert island...

Hi all! My name is Miles and I work on the Marketplace team. We’re looking for better ways to recommend and suggest apps that are truly crowd favorites, so of course we wanted to poll the Community. ...

2,665 views 5 6
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you