If you are like me and like as many shortcuts as possible then you’ll like this next very simple MOD for osTicket.
Standard Install:
Modified default action:
First we want to get rid of the default action altogether as we don’t want to keep it around and have it end up as an alternate action (as it does nothing). Find the following code:
include/staff/viewticket.php
<option value="">Select Action</option>
And comment it out using PHP commenting syntax:
<!--<option value="">Select Action</option>-->
Then just find the action you want (Close Tickets in my example) and cut it from its current location and move it directly underneath your commented out "Select Action" line.
<!--<option value="">Select Action</option>--> <?if($thisuser->canCloseTickets()){ //if you can close a ticket…reopening it is given. if($ticket->isOpen()){?> <option value="close" <?=$info['do']=='close'?'selected':''?> >Close Ticket</option> <?}else{?> <option value="reopen" <?=$info['do']=='reopen'?'selected':''?> >Reopen Ticket</option> <?} }?>
Make sure to get all the required ?> lines or you will run into trouble.