Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

Export all data from ticket


Hello, is it possible to export all the information of a ticket?
I mean to have a detail of all the fields, and not only those that are by default (Ticket Number, Date, Subject, From, etc.)
We have a personalization of a form and we are interested in knowing the options that select the user, to later obtain statistics



Osticket version 1.9.15
Tagged:

Comments

  • The export feature doesn't let you export absolutely everything.  You would have to do that at the SQL level or write your own script.
  • can you please give me an example how to do this?


  • You could try something like this

    SELECT tTicket.`ticket_id`, tTicket.`user_id`, tTicket.`status_id`, tTicket.`dept_id`, tTicket.`sla_id`, tTicket.`topic_id`, tTicket.`staff_id`, tTicket.`team_id`, tTicket.`email_id`, tTicket.`source`, tTicket.`isoverdue`, tTicket.`isanswered`, tTicket.`est_duedate`, tTicket.`closed`, tTicket.`created`, tField.`name`, tField.`label`, tValues.`value` FROM
    (SELECT * FROM `ost_ticket`) tTicket
    LEFT JOIN
    (SELECT * FROM `ost_form_entry` WHERE `object_type` = 'T') tEntries
    ON tTicket.`ticket_id` = tEntries.`object_id`
    LEFT JOIN
    (SELECT * FROM `ost_form_entry_values`) tValues
    ON tEntries.`id` = tValues.`entry_id`
    LEFT JOIN
    (SELECT * FROM `ost_form_field`) tField
    ON tValues.`field_id` = tField.`id`
Sign In or Register to comment.