[rt-users] Calculating the number of emails/replies/correspondences per ticket
Anthony Nguyen-Duong
anthnd at hotmail.com
Tue Oct 4 13:28:02 EDT 2016
Hi,
I'd like to find out how to add my own calculation to charts, as opposed to the limited Ticket Count and various time calculations available for charts.
I'd like to add a calculation that calculates the number of emails/correspondences between an agent and a customer. I've tried looking through "lib/RT/Report/Tickets.pm" and "share/html/Search/Chart.html", but there's a lot of things I don't understand in there.
Now, realistically I may not have to go through the effort of adding a calculation for charts.
My end result is a table that has the columns: TicketId, NumberOfEmails (and I'll probably add some other things like Subject and whatnot). However, I'd prefer not to have a Custom Field for NumberOfEmails, reason being I'm not sure if there's a way to calculate the number of emails for all my past tickets and set all of them to their correct value apart from manually counting and inputting it. Instead, I was considering doing Callbacks or something to count the number of Correspondences in the Transactions table from the database and appending a column to a table.
If I instead added a chart calculation, the end result would be more flexible - at the cost of a (possibly?)difficult implementation.
> New Chart
> Group tickets by Ticket/Id. (individual tickets, so basically no grouping; this might get out of hand for large numbers of tickets though; this is something else I'd like to know how to do)
> Calculate values of Email count.
> Generate bar chart or table
Now that I think about it though, I might just be able to add a column called Number of Emails to search results and get that sorted out.
Sorry my thoughts are kind of all over the place right now.
In summary, envisioned end result:
- A table/search result list (doesn't necessarily have to be a chart) that can be added to a dashboard that has, at minimum, the columns: TicketId and NumberOfEmails
- NumberOfEmails is preferably not a Custom Field
- The column NumberOfEmails must be able to find the number of emails between an agent and customer of all tickets that are currently in my database (I'd imagine I have to use SQL for this somewhere to count Correspondences for specific TicketId's)
I'd like to know what the best thing to do would be and how to start working on a solution.
I hope I've explained my problem well enough.
I can clarify further if you'd like.
Thank you,
Anthony
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20161004/e77f675d/attachment.htm>
More information about the rt-users
mailing list