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

Adding custom fields to the ticket table and sorting them

edited April 2017 in Mods and Customizations
I am trying to add custom fields to the ticket table. 


So I've followed these steps.

I've added a new header by modifying the $query_coloumns

$queue_columns = array(
        'severity' => array(
            'width' => '7.4%',
            'heading' => __('Severity'),

I can see a $sort_options array - is this for the button on the right hand side?

I've added the custom field to the $tickets->values

This adds the field to the table.
                    <?php echo $T['cdata__severity']; ?>

I've added this case to the switch ($sort_cols) 

case 'severity':
    $tickets->order_by('cdata__severity', $orm_dir_r);

^ I am unsure how to fix this sorting issue. Its not setting the dir - 0/1


  • edited April 2017
    This does not appear to be a Suggestion or Feedback.  Moving thread to Mods and Customizations.

    I presume this is osTicket 1.10?

  • Sure - I am not sure which version - some sorting of the coloumns work and they don't have case specific parts to them.
Sign In or Register to comment.