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

Where exactly do Tickets and Threads get Inserted Into Database?

Can anyone tell me exactly where, in the overall code files, the insertion of new ticket records and the insertion of thread records is performed?

Are there multiple places that actually execute the `INSERT INTO` or does it only happen in one spot?

Thank you for helping.

Comments

  • You will have to search the code.  Nearly no one runs 1.6 and 1.7 anymore.
  • Except us :)
  • It seems that 1.6 and 1.7 is not even available on github, the earliest release i can find is developer preview of 1.8.

    So it'd pretty difficult to tell where it is, but i'd say try backtracing from where your entry point is.
  • In my archives I have a copy of 1.7.. ot_ticket & ot_thread are the tables. ot_thread is joined to ot_ticket on ticket_id. 

    If you trace class.ticket.php create function it inserts into TICKET_TABLE (ot_ticket), then the message body get's appended as a Message, which is a ThreadEntry (class.thread.php), which eventually calls the create function, which inserts into the TICKET_THREAD_TABLE (ot_thread). 

    This becomes hideously complicated in later versions, where even the Subject is a "dynamic form field".. 
Sign In or Register to comment.