What files and MySQL tables need to be changed to add a new Supported Variable? Thanks!

Please help us to help you by reading and following the posting guidelines located in this thread: Please read before requesting assistance. The more information you give us the better we will be able to assist you. Thank you.

Environment details?
Version of osTicket?
What do you mean by a "Supported Variable"?

Sorry about that. The 'Supported Variables' as shown in the Canned Responses 'Ticket Variables'. I've added a new field and would like to add that to the new ticket alert email send. From what I've been able to find, osTicket has moved the ticket variables and renamed them several times over the years as the software has evolved. Curious where they're located now in 1.10. Thanks.

ntozier Thanks for the reply. I tried to see if I could just re-purpose one of the ticket variables that I wasn't using and assign it to the new field (for example, %ticket.priority) and it sort of worked, except that %ticket.priority is preset to display 'Normal' and not what is in the new field (in this case, a number string). Ugh. Then tried %ticket.notes and it returned 'Array'. So no go with this track!
I'm sure it's already been a requested feature, but being able to have custom ticket variables, even one or two fields, would be awesome. Thanks again!

ntozier Got it! Found the clue here, but not the solution:
https://github.com/osTicket/osTicket-1.7/issues/641

@pavel83, add a label to the switch statement in class.ticket.php in the getVar() function like this:

case 'company':
return $this->getCompany();

Then you can use %{ticket.company}

###
The above hacking of the code is NOT what you want to do, or necessary - this was for 1.7 and no longer applies.

Here's what I did:
1. Add a variable name to the custom field in the form (example.com/scp/forms.php)
2. To get it to print in email, simply code it as any other variable, for example %{ticket.custom_variable}

Cheers!

I'm glad that you got that figured out. ?

Should I close this thread since you are all set?

    Write a Reply...