All eazyBI for Jira eazyBI for Confluence Private eazyBI

Multi-level cascading field
eazyBI for Jira

Import Multi-Level Cascading Select field from the Jira app provided by Sourcesense. In defining the settings, use your multi-level cascading select field ID instead of NNNNN. Parameters may vary depending on how many levels should be defined.

Account-specific calculated field

Account specific calculated fields are defined in Source Data → Import options.

Settings for the new field

Internal name

mlfield_n

Display nameMultiLevel Fieldname
Data type

string 

Dimension

Additional advanced settings
json_fields = ["customfield_NNNNN"] #this line is mandatory
levels = ["Level 1","Level 2","Level 3"] #max levels you can have in Jira
split_by = ","

Custom JavaScript code:

var mlcs = issue.fields.customfield_NNNNN;
if(mlcs)
  {
    // If the field value is a string, parse it first
    let data = typeof issue.fields.customfield_NNNNN === 'string' 
      ? JSON.parse(issue.fields.customfield_NNNNN)
      : issue.fields.customfield_NNNNN;

    // Extract all label values and join them with commas
    let labels = [];
    for (let key in data) {
      if (data[key] && data[key].label) {
        labels.push(data[key].label);
      }
    }
    return labels.join(',');
  }

Global calculated field

Global calculated fields are defined in eazyBI advanced settings.

Here are the settings for the new field definitions. You should insert the JavaScript (the code given above) below the line // Insert here the Custom JavaScript codeKeep the opening and closing quotation marks. ''', do not delete them.

[jira.customfield_mlfield_n]
data_type = "string"
name = "MultiLevel Fieldname" #use this line to pick a name for new calculated field
json_fields = ["customfield_NNNNN"] #this line is mandatory
dimension = true
levels = ["Level 1","Level 2","Level 3"] #max levels you can have in Jira
split_by = ","
javascript_code = '''
    // Insert here the Custom JavaScript code  
'''