I would like to create a report which shows for one project in which hourly time intervals how many comments are added to a ticket.
For example that from four to five o’clock a total of 50 comments have been added (counting the comments of all tickets in the project).
I found it for the ticket creation date (Hourly time hierachy) but am not quite sure how to apply it to the number of comments.
Could you please help me with that?
The solution is possible using a not-fully documented feature of how Javascript calculated custom fields could be used. The idea is that we can define a “dummy” dimension of the hours and then create a custom measure of comment count measures with the mapping to the hour’s dimension.
We are not aware of the reasons why such configuration would not be working in some version. Please, try to do the double data import: first time with the two custom fields deselected, then select them again for import.
Please, send the support request if the problem persists.
I have seperated the javascript code from the quoted code so that only the javasript code is seperated when inserted.
And Javascript is treated as a return value, so i made sure to return the result variable.
var result=[];
if (issue.fields.comment && issue.fields.comment.comments) {
for (cmt of issue.fields.comment.comments) {
var hrs=new Date(Date.parse(cmt.created)).getHours();
result.push(cmt.created.substr(0,10)+","+
(hrs<10?("0"+hrs):hrs)+","+"1");
}
}
return result;
In this case, unlike the instructions, only one import destination appears, and an error occurs when i try to import the jira source data again after saving.