Question

Help Turning JQL Into Report

  • 18 September 2020
  • 1 reply
  • 91 views

Hi - 

 

I’ve written a JQL script to calculate how long people’s session are on our video chat app. I’d like to turn this into a regular Dashboard report. Is it possible to get something equivalent to this using the GUI? Here’s the code:

function main() {
return Events({
from_date: "2020-09-16",
to_date: "2020-09-17",
event_selectors: [{event: 'Started Speaking'}]
}).groupBy(["properties.current_party_name"],
(accumulators, items) => {
let ret = { earliest: new Date("2100-01-01"), latest: new Date("1970-01-01") }
for (let i = 0; i < accumulators.length; i++) {
ret.earliest = Math.min(accumulators[i].earliest, ret.earliest);
ret.latest = Math.max(accumulators[i].latest, ret.latest)
}
for (let i = 0; i < items.length; i++) {
let date = new Date(items[i].time);
ret.earliest = Math.min(date, ret.earliest);
ret.latest = Math.max(date, ret.latest);
}

ret.duration_in_minutes = (ret.latest - ret.earliest) / (60 * 1000);
return ret;
}
);
}

Thanks, 

  Jim Greer

  CEO, Bash Video


1 reply

Userlevel 5
Badge +3

Hey @jimgreer —

It looks like you were able to see that we have custom apps — but you will run into a limitation because Dashboards does not support custom apps, and it is not a very UI friendly function.

 

Can you share more detail about the limitations you found in our Insights report? I’d like to help you create a report that helps answer your questions, or at least direct you to our Ideas category where you can share direct feedback to our product team. 

Reply