At work we have been using OSTicket as our support ticketing software for a while now. And one of the things that has always really annoyed me about the software is when someone opens a ticket and I get the autogenerated email, the email is missing the ticket subject. Normally this wouldn’t be a big deal, but for some unfathomable reason a goodly portion of my coworkers seem to think that the subject line is where you should put important details. As you can imagine this can be troublesome if I am working from home or otherwise cannot get to the support site.
Take the following example:
subject: Jon Doh body: Please add to security group alpha.
That example with out the subject is completely un-processable. So since I like to think that I am handy with PHP and MySQL I started digging. The email is generated using entries in the email_template table. [note: This may be ost_email_template]
So since this table doesn’t have a way to edit it in the admin interface how do I change it? Great question! First get to a command prompt. [note: windows users can use the MySQL Administrator GUI]
> mysqldump -u username -p osticketDatabaseName --tables ost_email_template > ost_email_template.sql
Make sure that you replace username with your usernamme, and osticketDatabaseName with your database name. This will dump just the contents of your ost_email_template to the file ost_email_template.sql. Feel free to rename the file to something else. Please at this point make a copy of your back up. We’re going to be editting it, and if something bad happens you want to have a back up original copy. Open the copy of the file in your choice of text editor. [Windows Trick: opening it in word pad will put it in a more readable format.]
Locate the following text string: “Name: %name\r\nEmail: %email\r\n”
After that carefully insert “Subject: %subject”.
Save the file. Import the the table back into your database.
It import the data back into your database do the following:
> mysql -u username -p osticketDatabaseName < ost_email_template.sql
Once you have imported the template back into the database your emails will now include the ticket Subject. Honestly it was so easy I think that the devs just forgot to do it.
On the off chance that you hose your ost_email_template I have attached the default one to this article.