Extract department name from the Reporter dimension

Hi @Marko_Slijepcevic1

One idea is to define a new calculated field from the import options page that imports Department from reporter’s name during data imports and create a new dimension from these substrings.

Try this Javascript for new calculated field:

var rep = issue.fields.reporter;
var rep_dpmnt = "";
const regex = /\((.*?)\)/; // This regex captures anything inside parentheses

if(rep)
  var matches = rep.displayName.match(regex);
    if (matches) {
      rep_dpmnt = matches[1];
    }
return rep_dpmnt;

Martins / eazyBI