Hi Eazybi
I need a report that show only issues that have one of this labels: “BF22”, “BF22TESTE”
plus this label: “Estruturantes”.
Example
I create a javascript but not work. Anyone can help me?
[jira.customfield_labels1]
name = "BF_Estruturantes"
data_type = "string"
dimension = true
multiple_values = true
split_by = ","
javascript_code='''
var look_for=["Estruturantes", "BF22", "BF22TESTE", "LL_BF21"]
var result=new Array();
for (i=0;i<issue.fields.labels.length;i++) {
if (look_for.indexOf(issue.fields.labels[i])>=0) {
result.push(issue.fields.labels[i]);
}
}
issue.fields.
customfield_labels1=result.join(",");
‘’’
Hi @guinevere ,
Currently your code looks if only one of the labels defined in the list is in the Label field, but you would like to to check if the label is “Estruturantes” AND “BF22” or “BF22TESTE”.
In the Community there is already a similar answer that you may want to check for your use case:
Labels is multiple value field in Jira. There could be many combinations of labels for any issue. eazyBI calculated members in this case will work as if any of the labels as selected.
If you would like to count issues with all labels you can consider two options - use Javascript or MDX calculations for complex cases.
JavaScript might need more setup and maintenance, but it would work faster.
There are several options on how to build those dimensions based on labels:
When importing alternate…
best,
Gerda // support@eazyBI.com