JavaScript measure name

Hello,
When I create new calculated measure, it automatically gets 5 versions (* Created, * Due, * Resolved, * Closed, * with Due Date).


My question is if it is somehow possible to affect this. It creating huge amount of names which is confusing. Then it is shown in the chart legend, which is also confusing. Is there any possibility to have my own name without addition? Maybe I could create some wrapper Calculated measure for that? If so, what is best approach?

Thanks in advance.

It appears it is enough to create new calculated measure, call it as I want and then put inside name of the original measure.

Is there any better way how to achieve such “Rename”?

1 Like

Petr,

Your approach to renaming the standard measure is perfectly fine. It is not possible to impact the names for the standard measures; note that this set of measures is useful for possible mapping of your custom field measure differently to the time dimension.

There is, however, an option allowing to avoid creation of the full set of the measures with different mapping to Time dimension. If you know exactly by which date you would expect this measure to be mapped on time, you can create a Javascript custom field and use the multiple_dates option in the field settings. Note, that you need to construct a specific output with the help of Javascript in this case.

Please, find here an example, where the Original estimated hours are mapped by the due date:

[jira.customfield_org_est_duedate]
name = "Original estimated hour by duedate"
data_type = "decimal"
measure = true
multiple_dates = true
javascript_code = '''
ortimeEstimateDueDate = new Array();

if ((!ortimeEstimateDueDate || !ortimeEstimateDueDate[0]) && issue.fields.timeoriginalestimate && issue.fields.duedate ) {
 ortimeEstimateDueDate.push((issue.fields.duedate) + ',' + parseInt(issue.fields.timeoriginalestimate)/3600);
}
if (ortimeEstimateDueDate) {
 issue.fields.customfield_org_est_duedate = ortimeEstimateDueDate.join("\n");
}
'''

See here for more how the multiple_dates option is working: https://docs.eazybi.com/eazybijira/data-import/custom-fields/advanced-settings-for-custom-fields

Kindly,
Janis, eazyBI support