/build/static/layout/Breadcrumb_cap_w.png

Helpdesk Reporting Question

Helpdesk Reporting Question

I am creating a custom report for tickets grouped by site (custom field) with Comments as one of the columns. The problem is the comments column only shows the first comment. How would I get all the comments listed under a ticket without listing the ticket several times?

Thank for the help.


0 Comments   [ + ] Show comments

Answers (3)

Posted by: GillySpy 15 years ago
7th Degree Black Belt
1
You will have to customize the SQL of the query to get what you want and use a GROUP_CONCAT function on all the COMMENT fields. COMMENT is a row in the HD_TICKET_CHANGE table. For each ticket there are many comments.

Here's a basic version
SELECT HD_TICKET.ID, O.FULL_NAME AS OWNER_NAME, S.FULL_NAME AS SUBMITTER_NAME,
GROUP_CONCAT(COMMENT ORDER BY CAST(HD_TICKET_CHANGE.ID AS CHAR) DESC SEPARATOR '\n--------\n')
COMMENTS

FROM HD_TICKET JOIN HD_CATEGORY ON (HD_CATEGORY.ID =
HD_TICKET.HD_CATEGORY_ID)
JOIN HD_TICKET_CHANGE ON (HD_TICKET_CHANGE.HD_TICKET_ID = HD_TICKET.ID)
LEFT JOIN USER O ON (O.ID = HD_TICKET.OWNER_ID)
LEFT JOIN USER U ON USER_ID=U.ID
LEFT JOIN USER S ON S.ID=HD_TICKET.SUBMITTER_ID
WHERE HD_TICKET_CHANGE.OWNERS_ONLY=0
GROUP BY HD_TICKET_ID
ORDER BY HD_TICKET.ID desc

for a more complete version see the FAQs: [link]http://www.kace.com/support/customer/faq/index.php?action=artikel&id=954[/link]
Posted by: zpizzullo 15 years ago
Senior Yellow Belt
1
Thanks for the info. With a little playing around I was able to figure it out. But, now I am getting multiple separators at the end of the comments (see attachment). Why do they show up and is there a way to get rid of them? Trying to condense the report as much as possible. Thanks again.

Posted by: airwolf 15 years ago
Red Belt
1
The blank lines represent "description" updates (i.e. owner change or other field change... not a traditional "Comment"). These are represented in the tickets as bulleted items. Each of these entries has a blank Comment field, so that is why you cannot see the data in your report. I'll dig in and post a solution if I come up with one. Ideally, the report would show the Description field for each item when the Comment field is empty.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ