Calculated field as pages isn't displaying results

Hi,

I am working on a report to count the number of issues based on Issue Summary. Our Jira Admin said that they cannot import Issue Summary as Dimension but since Issue also includes Summary, she took the summary part out and imported that as calculated field and named it Issue Summary. Now when I run the report, and this new field under Dimensions, it works fine but when I use it under pages, it doesn’t display results of the result has more than one. Below are the screenshots, any help is greatly appreciated.

Issue Summary as Dimension displays following results.

Used Issue Summary as Pages and chose BA Review which should return multiple rows but no result is displayed as below

Chose a value which only has one row and it works okay

Can I get any help please? Issue Summary field isn’t working the way it should.

Hello @mpasapula

Apologies for the delayed response. I thought you reached out to us directly at support@eazybi.com with the same use case and I responded already there. I am pasting the same email I sent here below:

eazyBI is struggling to filter the report by the Summary dimension you have imported because the Summary has not been consistent across issues. This means that sometimes lower cases are used, and sometimes upper cases, and thus, the filter doesn’t work.

I suggest using the below JS code when importing the Issue Summary dimension (if you are going to amend the JS in the existing “Issue Summary” field that you had defined previously, make sure you perform double data import :
Step 1. Unselect the field from import → Import data.
Step 2 - edit the JS code using the code below instead, then select the field for import.
The code parses all letters to lower cases and then you can use the dimension in the filter.

if (issue.fields.summary) {
  // Split summary into words by whitespace characters
  let wordsArray = issue.fields.summary.split(/\s+/);
  // Trim each word in the array
  let trimmedWordsArray = wordsArray.map(word => word.trim());
  // Join the trimmed words with single spaces and convert to lowercase
  return trimmedWordsArray.join(' ').toLowerCase().trim();
}
return null;

Here is a screenshot of my test data and how results are returned when various upper/lower case combinations have been used in Issue Summaries

Let me know if this works for you or if you have any follow-up questions!
Best wishes,
Elita from support@eazybi.com

It worked, thank you Elita.

Thanks
Madhavi

1 Like