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

Email Subject

I am looking at modifying the email subject for new or replied to tickets.  We use a custom form on our tickets for new hires - there is a field where HR will fill in the employee's first and last name.  I want the subject then going forward be for example: "New Hire - Doe, John" - can I pull custom fields into the email template? 

Comments

  • To do this the ticket opener would have to populate a custom field that you setup with the information.

    You could then use the custom field in the email template in the subject. 

    Custom variables, such as those you add via Admin panel -> Manage -> Forms can be accessed using the name that you gave them and the prefix of the built in form that you added them to. So if you added a field called Agency that was added to the built in "Ticket Details" you would access it as ticket.agency, aka:

    %{ticket.VARIABLE}

    where VARIABLE is the case sensitive variable name you gave the form field.  Data associated with "Contact Information" is available via %{ticket.user.VARIABLE}.
  • Ok - so that makes sense but what if it's a custom form - I've attached a copy of the "Help Topic" and the "Custom Form". I know I've named the variable EmployeeName 
    Capture.JPG
    961 x 715 - 151K
    Capture1.JPG
    618 x 486 - 63K
  • I'm pretty sure that you would use %{ticket.employeename}
    I'd think that it has to be in all lower case... there was a problem with that in older versions.
    Give it a try. :)

    Go to one of these tickets.
    Edit it.
    Put that at the end of the subject.
    save it.
    update it and see what the email results as.
  • That worked - I had typed it in upper case - that was my mistake. I greatly appreciate your help.
  • Very welcome @eclarke!
    Should I mark this as resolved and close the thread?
  • Hello,
    I've created custom form similar to this issue and renamed subject to Issue Summary and made it a drop down menu

    these drop down menu items doesn't show to end user list as you can see Subject is empty for their tickets.

    So my question is it possible for any custom form field to be mapped to the user tickets Subject?

    Thank you
    Screenshot 2017-05-31 02.52.27.png
    811 x 190 - 43K
  • and this is my form fields
    form.png
    944 x 307 - 53K
Sign In or Register to comment.