In include/staff/viewticket.inc.php ~ line 180 find
<input class="button" type="submit" value="GO">
</form>
</td>
After it, add this.
<td><a href="tickets.php?id=<?=$row?>&action=assign&staff_id=<?=$thisuser->getId()?>&assign_message=<?=$thisuser->getUsername()?>">Claim Ticket</a>
</td>
Then in scp/tickets.php ~ line 42 find
$page='newticket.inc.php';
}
//At this stage we know the access status. we can process the post.
And add the following
if($_GET=="assign") {
$assign_message = "Ticket claimed by user ".$_GET;
if(!$thisuser->isadmin() && !$thisuser->isManager() && $thisuser->getId()!=$ticket->getStaffId()){
$errors='Ticket already assigned. You do not have permission to re-assign assigned tickets';
}
if(!$errors && $ticket->assignStaff($_GET,$assign_message)){
$msg='Ticket Assigned to staff';
$ticket->reload();//Reload ticket info following post processing
}else{
$errors=$errors?$errors:'Unable to assign the ticket';
}
}