Page 1 of 1

Customization to the Export Tickets in Reports

Posted: Sun Apr 16, 2023 3:05 am
by mlafontaine
Script URL:
Version of script: 3.4.3
Hosting company: Hostinger.com
URL of phpinfo.php: Not applicable
URL of session_test.php: not applicable
What terms did you try when SEARCHING for a solution:
sql export all tickets
sql dump all ticket
sql query all ticket
export ticket sql
Write your message below:

I am using the report extract from Admin Screen -> Repots -> Export Tickets

That report is great and provides me with almost everything I need. I put it in Excel and I can sort, filter, and order it any way I want. Unfortunately, I have one thing missing:

My ideal report would be exactly that, but would includes all replies in the Message field. The most recent replie fist in the "Message" field instead of only the first one as it is right now. Maybe all replies would be too much, in such case we could also limit the replies to the 10 most recent ones.

I looked at my https://website.com/hesk_directory/admin/export.php file. Unfortunately with my limited php knowlege, I am not able to recognize any place in the php program where the sql query is formed and looking for the database field hesk_replies or how the "Message" field of the xml output is packaged in the xml files to import into excel. If someone could provide me with either the final sql statement used or the area where the " Message" field is populated in this script, it would greatly help me to try to customize it.


Any suggestion is Welcomed

Best Regards

Marc L.

Re: Customization to the Export Tickets in Reports

Posted: Mon Apr 17, 2023 4:00 pm
by Klemen
One way to handle that would be to edit the function hesk_export_to_XML inside /inc/export_functions.inc.php

In the while ($ticket=hesk_dbFetchAssoc($result)) loop you would have to lookup up all replies for each ticket, and append those to the message, for example.

The exact code to do that is unfortunately out of the scope of my support; you may need to hire a PHP developer for help if you cannot get it to work yourself.

Re: Customization to the Export Tickets in Reports

Posted: Mon May 12, 2025 12:10 pm
by boogers
mlafontaine wrote: Sun Apr 16, 2023 3:05 am Script URL:
Version of script: 3.4.3
Hosting company: Hostinger.com
URL of phpinfo.php: Not applicable
URL of session_test.php: not applicable
What terms did you try when SEARCHING for a solution:
sql export all tickets
sql dump all ticket
sql query all ticket
export ticket sql
Write your message below:

I am using the report extract from Admin Screen -> Repots -> Export Tickets

That report is great and provides me with almost everything I need. I put it in Excel and I can sort, filter, and order it any way I want. Unfortunately, I have one thing missing:

My ideal report would be exactly that, but would includes all replies in the Message field. The most recent replie fist in the "Message" field instead of only the first one as it is right now. Maybe all replies would be too much, in such case we could also limit the replies to the 10 most recent ones.

I looked at my https://website.com/hesk_directory/admin/export.php file. Unfortunately with my limited php knowlege, I am not able to recognize any place in the php program where the sql query is formed and looking for the database field hesk_replies or how the "Message" field of the xml output is packaged in the xml files to import into excel. If someone could provide me with either the final sql statement used or the area where the " Message" field is populated in this script, it would greatly help me to try to customize it.


Any suggestion is Welcomed

Best Regards

Marc L.

Hi, i'm looking for exactly the same as you did :) did you even find a solution in your php file to export all reply's?
Thanks in advance
Steven