Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Original estimate hours grouped by issue due dates

Sanzio Castor
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 19, 2018

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

0 votes
Daina Tupule eazyBI
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 23, 2018

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
TAGS
AUG Leaders

Atlassian Community Events