Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

Modify ticket view list in latest version?

I used osticket previously and added due date however those howtows dont seem to work with the latest 

I would like to list STATUS and DUEDATE in the overview list 

anyone done this  and i wanna share google just gives me for old osticket versions 
thanks

Comments

  • i added due date to the column by editing /include/staff/ticket.inc.php in the latest version 1.9.7
    1. i added a th element using the same format as the one for the date at around line 371
    <th width="70">
                    <a  <?php echo $date_sort; ?> href="tickets.php?sort=duedate&order=<?php echo $negorder; ?><?php echo $qstr; ?>"
                        title="<?php echo sprintf(__('Sort by %s %s'), __('duedate'), __($negorder)); ?>"><?php echo __('Due Date'); ?></a></th>

    2.i added <td align="center" nowrap><?php echo Format::db_datetime($row['duedate']); ?></td> at around line number 469
    right after the td element which contained effective_date

    so far it pulling the right information. the only thing i didnt do yet is making sure the sort works for due date
  • Thanks yisrael
  • Yisrael if you ever figure out the Sort function let me know :)
  • Ok I have figured it out.
    At around line 163 you will see an associative array called $sortOptions.
    Add to the array 'duedate'=>'duedate'
    it should look like this


    $sortOptions=array('date'=>'effective_date','duedate'=>'duedate','ID'=>'ticket.`number`*1',
        'pri'=>'pri.priority_urgency','name'=>'user.name','subj'=>'cdata.subject',
        'status'=>'status.name','assignee'=>'assigned','staff'=>'staff',
        'dept'=>'dept.dept_name');

    you can use any text for the key. so it could be 'anything here'=>'duedate'
    whatever you use for the key should be used in the url i listed earlier 
    so it would be href="tickets.php?sort=put your key here&order=

    let me know if it works for you

  • Thanks man!
  • This makes sense, but I can't quite wrap my head around it. I know what I want, but I'm too rusty to make it work. 

  • This is awesome!  I don't know any PHP but can figure out some of it if I know what things are pointing to, would you be able to explain the code in each of these sections, what it's referencing?  Also I have a list I created which is a list of Buildings.  Would it be possible to add this to the Ticket Dashboard as a column?

    Thanks!
  • Thanks for posting this, worked great!  One small thing I caught, the row extends down through the "Select: All, None, Toggle" row.  To fix this, you can just edit line #508, and change <td colspan="7"> to <td colspan="8">

    I also noticed that the "Due Date" column won't highlight if selected as the sort field, and the arrows don't change to show the direct of sorting when selected.  I've only looked briefly but didn't find a fix yet.  Any thoughts?  If I find the answer, I'll post it here as well.

    Thanks!

Sign In or Register to comment.