Andrew (another one) got in contact with me asking if I could help him to how to show an extra column in osTicket 1.9.4, he tired to follow my previous post without much luck (after rereading it, I’m surprised if that’s ever helped anyone!).
He wanted the ability to see and sort by a “Due Date” column. Well it turns out to be a really easy feature to add.
Here is a GitHub Gist of the modified tickets.inc.php
Instructions for use:
- Backup /[osticket-install]/include/staff/tickets.inc.php
- Download the following file and copy it to /[osticket-install]/include/staff/tickets.inc.php
- Test! (If it break badly, I’m sorry, please restore your backup file).
As a side note, it also got me to finally setup a github account!
Here is the step by step instructions:
- Update the sort options ~Line 170.Effectively what we are doing here is adding the ‘duedate’=>’duedate’ to the array. So replace $sortOptions with below:
[gist id = “c66ef9d90bdcbf874685” file = “step-1.php” width = “90%”]
- Add the heading to the table ~Line 374
Just add the following line in after the closing </th> tag for the line <a <?php echo $date_sort; ?>………
[gist id = “c66ef9d90bdcbf874685” file = “step-2.php” width = “90%”]
- Add the data row to the table ~ Line 468
After the <td align=”center” nowrap><?php echo Format::db_datetime($row[‘effective_date’]); ?></td> add:
[gist id = “c66ef9d90bdcbf874685” file = “step-3.php” width = “90%”]
- Finally fix up the footer ~ Line 506
Change <td colspan=”7″> to:
[gist id = “c66ef9d90bdcbf874685” file = “step-4.php” width = “90%]
- Thats it!
Don’t break it!