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

I am trying to add custom fields to the ticket table. 

image

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
$tickets->values('cdata__severity')

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

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

Comments

  • edited April 25
    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.