Scripted field HTML tag values to new calculated member

Hello,
I have a imported and synced a scripted field according to this guide, where my values are long HTML tags which renders to coloured tags within Jira. These doesn’t render in EazyBI, so I am looking into renaming these to plain text for readability.

See image 1

I read that it should be possible to create a new calculated member with a custom name, which is equal to the member with the HTML tag, like this.

See image 2

However, when I try, it doesn’t seem to pick up the value of the original member.

See image 3

In my example, I would want my new calculated member, Low (L), to display the same amount, 3, as the first HTML tag.

Any ideas on why this isn’t working? My own guess is that the calculated member doesn’t read the HTML tag due to special characters or something like that. I did the same test with another field that had normal plain text, and it re-named the field perfectly using a new calculated member.

If this is not possible due to this, are there any other ways to make the dimension more readable?

Images:

Thanks,
Therese

Hi @theresedo,

Welcome to the eazyBI community!

Lots of special characters might confuse internal queries.
​I would suggest pre-processing the field values during the data import.

​You might “sanitize” the field contents using the following JavaScript code by creating a new JavaScript calculated customfield. You might read more about that here - Account specific calculated fields.

The actual JavaScript code might be as follows.

if (issue.fields.customfield_NNNNN){
 var fullen = issue.fields.customfield_NNNNN.length;
 var startchar = issue.fields.customfield_NNNNN.indexOf("span")+23;
 var valpart = issue.fields.customfield_NNNNN.substring(startchar, fullen-7);
 startchar = valpart.indexOf(">")+1;
 var resvalue = valpart.substring(startchar);
  return resvalue;
}

Where the NNNNN stands for the ID of the customfield.

​You might then import it as a separate ​customfield dimension.

​Regards,
​Oskars / support@eazyBI.com