Custom field availability in Advanced Settings

Hello, I am defining new Measures and Dimensions in Advanced settings. Some of my new calculations are based on Custom fields in issues. Some of my calculations did not worked properly, because they could not see Custom Field values. I have found that I have to import all involved custom fields as well, in order to get correct processing of things in Advanced settings. For example, if my calculated Dimension using Language custom field, I have to import Language as well. It is possibly using data previously imported, instead data from JIRA.

This is very inconvenient, as some of those custom fields are needed only in the calculation, so it is just ballast data for the Cube. We are constantly struggling to keep the cube as small as possible, because we have performance issues due to amount of data.

Could you please help me understand the reason behind? Maybe it is bug, maybe it is necessary for something, maybe it is some optimization (working with alredy cached data could be potentially faster)? Is there any workaround? We would prefer longer import time in order to get smaller/faster cube.

You are correct on how JavaScript calculated custom fields works for eazyBI add-on for Jira on Server. We use JAVA API to access Jira data and we generate JSON based on imported fields, custom fields, and history entries only for selected/imported custom field data selections. Only generated JSON could be used in JavaScript calculations.

You would like to import any custom field as a property at least, to get it accessible in JavaScript calculations. You do not need it as a measure, or dimension, though. Import this field as a property only to minimize the imported data amount.

If you would like to access change history entries of a custom field, you would like to import value changes for the field. In this case, you should have it as a dimension, or measure as well.

The alternative is to use some scripted fields in Jira where you have this calculation there. It could have an impact in Jira, though.

There is a difference in eazyBI for Jira cloud. eazyBI uses REST API and we can access all Jira issue fields directly there, even if they are not imported. You should use a json_fields = [“customfield_NNNNN”] parameter in the custom field definition to address a custom field NNNNN in the calculation without importing it.

[jira.customfield_XXXXX]
name = "New custom field"
data_type = "string"
json_fields = ["customfield_NNNNN"]
javascript_code = '''
... // customfield_NNNNN is accessed here
'''

The custom field definition could work for eazyBI for Jira cloud when you access the custom field with ID NNNNN in the JavaScript calculation without importing it.

Daina / support@eazybi.com

1 Like

Thank you for explanation. Please allow me last question: How Dimension, Measure and Property import sizes usually differs? I thought it would be quite similar, because it changes mainly how the data are stored and related. Could you please explain on some generic example?

eazyBI creates indexes in a database for custom fields imported as dimensions. In some cases, we create a separate table for dimensions as well. We create separate tables automatically for any multiple values dimension.

We create a separate set of columns in measures table for any custom field imported as a measure. The count of columns varies depending on dates imported as measures, the minimal count is a set of five additional columns for each numeric custom field imported as a measure with mapping to default date fields: Created, Resolved, Due, With Due date, and Closed. We create even more columns if you are importing date custom fields as measures.

Daina / support@eazybi.com

This answer helped me. I wanted to use Description in a calculated custom field, but it wasn’t working since Description doesn’t get imported. After I added Description to json_fields, my calculated field workd.

BTW, I didn’t find the json_fields parameter documented. Is it fully supported?

Hi @hroch,
I wanted to let you know that we have released eazyBI version 7.1. recently. In this Server/Data Center version, we included the feature to allow using the json_fields parameter in your JavaScript calculated fields without importing those fields in your eazyBI account.

Best,
Gerda // support@eazybi.com