I have implemented the mod to add the "assign to" drop down when creating a new ticket
We have a pretty small support team right now, so I am trying to make it so that this drop down by default selects the staff member who is creating the ticket while still allowing the option to select a different staff member.
This is the current code
<select id="staffId" name="staffId">
<option value="0" selected="selected">-Assign To Staff-</option>
<?
//TODO: make sure the user's group is also active....DO a join.
$sql=' SELECT staff_id,CONCAT_WS(", ",lastname,firstname) as name FROM '.STAFF_TABLE.' WHERE isactive=1 AND onvacation=0 ';
$depts= db_query($sql.' ORDER BY lastname,firstname ');
while (list($staffId,$staffName) = db_fetch_row($depts)){
$selected = ($info==$staffId)?'selected':''; ?>
<option value="<?=$staffId?>"<?=$selected?>><?=$staffName?></option>
<?
}?>
</select><font class='error'><b>*</b> <?=$errors?></font>
<BR><input type="checkbox" name="alertstaff" <?=(!$errors || $info)? 'checked': ''?>>Send alert to assigned staff.
I don't really know php too well but I think I should be using $thisuser to determine the current logged in staff but I really don't know php to well and everything I try wont load the newticket page.