Issue labels as property

label

#1

Jira field “Label” is being imported in eazyBI as a separate dimension out of the box, but there are cases when you would want to display issue labels (comma separated string) as the property in your eazyBI report.
One way would be by creating a new calculated member in “Measures” dimension using MDX code, but it would still take some time to calculate results in the report as they should come from “Label” dimension based on the report context.

A much faster calculation would be by defining a new Javascript calculated custom field via eazyBI advanced settings

[jira.customfield_alllabels]
name = "All labels"
data_type = "string"
javascript_code = '''
var labellist = new Array();
if ( issue.fields.labels && 
     issue.fields.labels.length > 0) {
  var lbls = issue.fields.labels;
  for (var i = 0; i < lbls.length; i++) {
  var lbl = lbls[i];
    {
	labellist.push(lbl.name)}; 
 }
issue.fields.customfield_alllabels = lbls.join(",");
}
'''

Then you could select this new field “All labels” via Jira import options to import as the property for an issue and display in your report.