# Original Estimate Vs Time to Market

**URL:** <https://community.eazybi.com/t/original-estimate-vs-time-to-market/4582>\
**Category:** Questions & Answers\
**Tags:** calculatedmembers\
**Created:** [June 4, 2020, 4:06pm UTC](https://community.eazybi.com/t/original-estimate-vs-time-to-market/4582 "2020-06-04T16:06:50Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![daina.tupule](https://community.eazybi.com/user_avatar/community.eazybi.com/daina.tupule/32/8838_2.png) [@daina.tupule](https://community.eazybi.com/u/daina.tupule)\
**Post date:** [June 13, 2020, 11:14am UTC](https://community.eazybi.com/t/original-estimate-vs-time-to-market/4582/2 "2020-06-13T11:14:22Z")

</div>

eazyBI by default imports Original estimated hours as a measure. You would like to have it as an interval dimension.

You can import Original estimated hours as an interval dimension.

Here are two community posts on how to use JavaScript custom field for Original estimated hours import.  
This one is for dimension. You can use it as an example and add some parameters in the field definition to define the same field as an interval dimension:

> [@Original estimate hours in Dimension](https://community.eazybi.com/t/original-estimate-hours-in-dimension/3749/2):
>
> Hi @rohit, You may import “Original estimated hours” also as a dimension using JavaScript calculated custom field. Then you will be able to group or filter issues by the “Original estimated hours” category (value). In eazyBI advanced settings, add this piece of definition with JavaScript code to retrieve original estimated hours from issue data. [jira.customfield\_oeh] name = "Original estimated hours" data\_type = "decimal" dimension = true javascript\_code = ''' if (issue.fields.timeorigin…

Here is another approach for Original estimated hours import as a measure related to any date and as a property as well:

> [@Date in original estimated time by other date measure](https://community.eazybi.com/t/date-in-original-estimated-time-by-other-date-measure/445/2):
>
> Hi Jose Maria Measure Original estimate hours are related to issue creation date only. If you need to retrieve Original estimated hours with any other date, you can create a new custom field measure with JavaScript code. This measure will automatically be related to all default dates and any other [date you are importing into eazyBI as a measure](https://docs.eazybi.com/display/EAZYBIJIRA/Custom+Fields#CustomFields-Measureswithcustomdatefields). Here is a [JavaScript custom field](https://docs.eazybi.com/eazybi/data-import/data-from-jira/jira-custom-fields/javascript-calculated-custom-fields) definition for Original estimated hours: [jira.customfield\_oe] name = "Original estimated hours" data\_type = "decim…

As you can see from both examples, you can use one JavaScript code and define a field using different parameters. Here I added all of them:

```
[jira.customfield_oe]
name = "Original estimated hours"
data_type = "decimal"
dimension = true
measure = true
javascript_code = '''
if (issue.fields.timeoriginalestimate) {
  timeoriginalestimate = issue.fields.timeoriginalestimate / 3600.0;
  issue.fields.customfield_oe = timeoriginalestimate;
}
'''
intervals = "800,2400"

```

Please note, you would like to add intervals as the last parameter below javaScript code. I set intervals:

- ten days (800 based on estimates 8 hours per day)
- 30 days ( 2400 based on estimates 8 hours per day).

The JavaScript for Original estimated hours is calculated in hours. I left it like this for more general usage of this field in eazyBI. You can use a division by 8 directly in the JavaScript formula to get values in days based on estimation 8 hours per day if there is no any other usage than this. If you change the data in JavaScript, please update intervals accordingly. You can remove parameters to import Original estimated hours as a measure for this as well leaving only options you will use in eazyBI.

Daina / [support@eazybi.com](mailto:support@eazybi.com)

---

_[View the full topic](https://community.eazybi.com/t/original-estimate-vs-time-to-market/4582)._
