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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published May 30, 2018 in Marketplace Apps

Three tips for boosting your board's efficiency with Story Maps

Trello is one of the most effective tools for driving your sprints. It's customizable for every Agile team and product owners and Scrum masters (SM) love it. However, Agile teams often struggle with:...

830 views 2 9
Read article

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