I am new to osTicket and it looks very handy.

If staff creates a 'New Ticket' they have to select some options. Wondering if it is possible to define defaults for 'Ticket Source' and 'Department'. I guess most of the tickets created by stuff are phone calls. So it would be nice to have 'Phone' as default for 'Ticket Source'. Also 'Support' as default for 'Department' will save a little time. Last but not least, include the signature by default would be great.

Is this possible?

Yes. You can achieve this by editing the

OST_Main_Dir\include\staff\newticket.inc.php

Search for "Ticket Source"

inside move "selected" to the desired entry. Such as

<select name="source">

<option value="">Select Source</option>

<option value="Phone" <?=($info=='Phone')?'selected':''?> selected >Phone</option>

<option value="Email" <?=($info=='Email')?'selected':''?>>Email</option>

<option value="Other" <?=($info=='Other')?'selected':''?>>Other</option>

</select>

Will change it to phone.

Department is a little harder and requires some PHP. The area that you want to change is:

<option value="" selected >Select Department</option>

<?

$services= db_query('SELECT dept_id,dept_name FROM '.DEPT_TABLE.' ORDER BY dept_name');

while (list($deptId,$dept) = db_fetch_row($services)){

$selected = ($info==$deptId)?'selected':''; ?>

<option value="<?=$deptId?>"<?=$selected?>><?=$dept?></option>

<?

}?>

</select>

This is untested, but I imagine something like this would do the trick.

<option value="">Select Department</option>

<?

$services= db_query('SELECT dept_id,dept_name FROM '.DEPT_TABLE.' ORDER BY dept_name');

while (list($deptId,$dept) = db_fetch_row($services)){

$selected = ($info==$deptId)?'selected':'';

if (($dept == 'Support')||($deptId=='')) {?>

<option value="<?=$deptId?>" selected><?=$dept?></option>

<?

}

else {

<option value="<?=$deptId?>"<?=$selected?>><?=$dept?></option>

}

}?>

</select>

That should do the trick. :) None of this is tested. But I'm sure it will give you an idea of where to start and what needs to be done.

The signature is essentially the same. Locate the following:

<label><input type="radio" name="signature" value="none" checked > None</label>

<?if($appendStaffSig) {?>

<label> <input type="radio" name="signature" value="mine" <?=$info=='mine'?'checked':''?> > My signature</label>

<?}?>

<label><input type="radio" name="signature" value="dept" <?=$info=='dept'?'checked':''?> > Dept Signature (if any)</label>

and change it by moving checked to the appropriate option. If you wanted it to default to the department sig this should work (once again untested):

<label><input type="radio" name="signature" value="none"> None</label>

<?if($appendStaffSig) {?>

if ($info!='mine') {

$info=='dept';

}

<label> <input type="radio" name="signature" value="mine" <?=$info=='mine'?'checked':''?> > My signature</label>

<?}?>

<label><input type="radio" name="signature" value="dept" <?=$info=='dept'?'checked':''?> > Dept Signature (if any)</label>

Good luck!

10 days later

ntozier, very impressive! Thanks for your very helpful reply. Cheers.

14 years later

OST_Main_Dir\include\staff\newticket.inc.php can not be found. Can the file (newticket.inc.php) be created manually?
Thanks

    dang_truong1

    This thread is 14 years old; you will not get a response. Please create your own discussion. I’m closing this out now.

    Cheers.

    Write a Reply...