I have installed this MOD and started receiving the previously mentioned "DB error 1064" in my Systems Logs page. I have tried to contact Masino without any luck.
Luckily, Mark (forum user - mseelenb) posted the following cure( in the previous discussion);
Below you'll find the updated code for two files that needs to be edited.
"Staff to view only Assigned Tickets" MOD
When you use the User Group method to manage the roles of staff and managers, there appears a problem. Staff that's assigned for a department can see all of open tickets. In my case, there are several departments with several help topics. Each department has a single manager but with a number of staff assigned. I would like to enable the manager to see all open tickets in his department, while the staff could only see tickets assigned specifically for him/her. In order this fix to work, you need to edit the following files and replace related code;
\include\staff\tickets.inc.php
original code:
}else{
//limited depts....user can access tickets assigned to them regardless of the dept.
$qwhere =' WHERE (ticket.dept_id IN ('.implode(',',$depts).') OR ticket.staff_id='.$thisuser->getId().')';
}
updated code:
}else{
//limited depts....user can access tickets assigned to them regardless of the dept.
//now only admin can access all tickets
if ($thisuser->isadmin()) {
$qwhere =' WHERE (ticket.dept_id IN ('.implode(',',$depts).') OR ticket.staff_id='.$thisuser->getId().')';
} elseif ($thisuser->isManager()) { // manager can access tickets belong to his/her dept.
$sql.=' WHERE (ticket.dept_id IN ('.implode(',',$thisuser->getDepts()).'))';
} else { // staff can only access the assigned tickets to him/her
$qwhere =' WHERE (ticket.staff_id='.$thisuser->getId().')';
}
}
Second file
\scp\tickets.php
original code:
if(!$thisuser->isAdmin()){
$sql.=' WHERE ticket.dept_id IN('.implode(',',$thisuser->getDepts()).') OR ticket.staff_id='.db_input($thisuser->getId());
}
updated code:
if($thisuser->isAdmin()){
// there is no WHERE condition for Admin, he/she can see all tickets.
} elseif ($thisuser->isManager()) { // manager can access tickets belong to his/her dept.
$sql.=' WHERE (ticket.dept_id IN ('.implode(',',$thisuser->getDepts()).'))';
} else { // staff can only access the assigned tickets to him/her
$sql.=' WHERE (ticket.staff_id='.$thisuser->getId().')';
}