• Home
  • Shell
    • Emacs
    • Perl
    • screen
    • sed
  • Ubuntu
    • VNC
  • Web Development
    • Javascript
    • Joomla
    • MySQL
    • osTicket
  • Windows
    • Gimp

Posts tagged default

osTicket> Change default action

Oct26
2010
Written by Scott Rowley

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.

Posted in osTicket - Tagged action, mod, modified, osTicket, ticket

Corrections? Questions? Comments?

Find an error?
Everything work out great for you?
Have some feedback?
Like to see something added to the article?

PLEASE leave us a comment after the article and let us know how we are doing, or if something needs corrected, improved or clarified.

Thank you!
- The Management

Advertisement

Sudo Bash
By Geeks - For Geeks

Back to Top