Define calculated members in advance settings


#1

Hi EazyBI Team,

I would like to suggest a feature request.

In advance settings, you can add Custom Field (existing or not).

https://docs.eazybi.com/eazybijira/data-import/custom-fields/javascript-calculated-custom-fields#JavaScriptcalculatedcustomfields-Calculatedworklogcustomfield

If this “Custom field” does not refers to a existing JIRA custom field, their is no data (normal behavior), but it can be add as dimension or measure in data source.
I want to create default calculated members for this field for all accounts :

[jira.customfield_domain_jira_veyes]
name = "Domain JIRA V-Eyes Unified"
data_type = "string"
dimension = true
calculated_members = [{"name":"Financial","dimension":"Domain Mutualis\u00e9","formula":"[Domain].[Financial] + [Domain V-Eyes].[Finance]","format_string":""}]

Is it possible to do something like that with JavaScript code ?

Thank you for your support.

Best Regards,
Nicolas DUPRE


#2

Hello Nicolas,

You are correct. You could use calculated JavaScript for a new dimension creation and calculating some members there. This is a supported way how to extend existing Jira issue cube with new dimensions and measures.

From shared example, it seems you would like to calculate new custom field values based on the values in other custom fields.

  1. You would like to import other custom fields into eazyBI at least as a property to get access to their values.

  2. Then you can access other imported custom fields with expression issue.fields.customfield_NNNNN within the JavaScript calculation. Please use custom field ID instead of NNNNN for each custom field you would like to access via JavaScript. Please take into account values in a custom field could be saved in different ways based on custom field type.

  3. You can use an option custom JavaScript code for testing your code. You can access the Jira Issue JSON and see how values in each custom field are stored there as well. Delete the code from this field after testing.

  4. Add the custom field definition with JavaScript code in eazyBI advanced settings. This will give you an option to select the field for import in any account you need it.

eazyBI import Jira data from issues. JavaScript calculations are applied to issues as well. You will have calculated values in the new custom field for each issue. Therefore data import and analyze options would be similar to any other custom field import into eazyBI.

Daina / support@eazybi.com