Dears,
We are trying to customize ticket assignment in osticket as per the below requirement:
- Managers only assign to their associated department members.
The customization implemented is as follows:
in the viewticket.inc.php file we had added the following to the $sql statement below
<span for="staffId">Staff Member:</span>
<select id="staffId" name="staffId">
<option value="0" selected="selected">-Select Staff Member.-</option>
<?
$sql=' SELECT staff_id,CONCAT_WS(", ",lastname,firstname) as name FROM '.STAFF_TABLE.
' WHERE isactive=1 AND onvacation=0 AND dept_id='.$staff->getDeptId();
What we are trying to implement is really simple, we are willing capture the DeptId of the staff using the getDeptId function in staff class and amend it to the sql statement as shown above.
The problem we are facing is that the staff class is not functioning as it is supposed to be. Even echoing the result of $staff->getDeptId() fails. Is the staff class being mis-used by us? Also note that we even tried using the db_input() function and it is also not working.
Appreciate your kind support, as we are trying to figure out what is going wrong here.
Best Regards,
Mohamed