I have a table for Issues Created by Reporters. I’m trying to make a new field that calculates the sum of the number of comments on all of those issues.
This is the script I’m using:
Issue comments form Jira are not imported by default into eazyBI.
However, you could try using a Javascript code in your eazyBI advanced settings to define a custom field that will return the number of comments for an issue.
Later you could import this custom field as a measure (via eazyBI import settings) that will create a new set of measures “Comments created”, “Comments resolved” etc. in your “Measures” dimension.
Then you could select the measure “Comments created” and it should return the total number of comments for an issue.
If you already have been using some add-on to calculate a custom field (which return the total number of comments) in Jira, you could simply try importing this custom field in eazyBI as a measure via eazyBI import settings (and avoid using Javascript in advanced settings).
That approach should return the total number of comments for each issue (regardless of which user commented)
Note that it will not return the number of comments that specific reporter made.
If you expect to calculate the number of comments per reporter, a different Javascript code should be used to calculate the number of comments each user made and then you should map this to “Reporter” dimension.
No. There is no need to create a new custom field in Jira beforehand.
With JavaScript calculated custom fields you can create new custom fields only on the eazyBI side based on available issue data.
Hi both,
I expect to calculate the number of comments per reporter, so could you advise on the different Javascript code that should be used to calculate the number of comments each user made? Also, is it possible to count comments made to customer’s ONLY?
There are several JavaScript examples to count comments in the Community. You can start with those and then improve.
In any case, please read the documentation on how to define and validate the Javascript code before using it (those would be the first two paragraphs): JavaScript calculated custom fields.