Calculated with two or more labels

Hi Eazybi

I need a report that show only issues that have one of this labels: “BF22”, “BF22TESTE”
plus this label: “Estruturantes”.
Example

image

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:

best,
Gerda // support@eazyBI.com