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

Choosing WHICH department signature to use on ticket

I had a request to implement the ability for different dept signatures to be choosen and appended to the email response on a ticket.

So here it is:

First in staff/

Find the following

</select>&nbsp;&nbsp;&nbsp;<label><input type='checkbox' value='1' name=append checked=\"true\" />Append</label>
<? } ?>

Right below that add the php code to create the dept table driven dropdown.
$query = 'SELECT * FROM tableName';
$result = mysql_query($query);
$options = '';
while ($row = mysql_fetch_assoc($result)) {
$dept_id = $row['dept_id'];
$dept_name = $row['dept_name'];
$dept_signature = $row['dept_signature'];
$options .= \"<OPTION VALUE=\\"$dept_signature\\">\" . $dept_name . '</option>';
$returned = '';
if (isset($_POST['submit'])) {
$returned = $_POST['choice'];

Next find the line that has
<label><input type=\"radio\" name=\"signature\" value=\"dept\" <?=$info['signature'] == 'dept' ? 'checked' : '' ?> > Dept Signature</label>

...and add below it

<select name=\"choice\">

....and thats it for the VIEW part of it


  • Now for the class.ticket.php

    Next open staff/class.ticket.php

    On line 826 find
    case 'dept':
    $signature=($dept && $dept->isPublic())?$dept->getSignature():''; //make sure it is public

    ...and replace it with
    case 'dept':
    //$signature=($dept && $dept->isPublic())?$dept->getSignature():''; //make sure it is public
    $signature = $_POST['choice'];

Sign In or Register to comment.