Hello community,

I want to create a report that will show all parent tickets including their child tickets for each owner.

The problem I have is to only extract the parent tickets and their child tickets. In below query the HD_TICKET.IS_PARENT = '1' filter already ignores none parent tickets so that the child tickets are not shown:

SELECT O.FULL_NAME AS OWNER_NAME, HD_TICKET.TITLE, HD_STATUS.NAME AS STATUS_NAME, HD_TICKET.ID, HD_TICKET.CREATED, HD_TICKET.MODIFIED  FROM HD_TICKET  LEFT JOIN USER O ON (O.ID = HD_TICKET.OWNER_ID) JOIN HD_STATUS ON (HD_STATUS.ID = HD_TICKET.HD_STATUS_ID) WHERE (HD_TICKET.HD_QUEUE_ID = 1) AND ((HD_TICKET.IS_PARENT = '1'))  ORDER BY OWNER_NAME, STATUS_NAME, ID

I hope this is possible. Perhaps you can show me a way.
Thanks in advance!

BR,
Thorsten


2 Comments   [ + ] Show Comments

Comments

  • Do you want a count of child tickets per parent or an actual list of the child tickets?
  • a list of the child tickets with title,id, created, status - ideally with link to the ticket
    • In order to do that you would need a sub select that would pull these fields from the child tickets into a column on the report of parent tickets. This would look really messy. If you want a nice layout you'll probably need to use something like Crystal Reports.
Please log in to comment

There are no answers at this time

Answers

Answer this question or Comment on this question for clarity