Quantcast
Channel: Recent Discussions on osTicket Forums
Viewing all articles
Browse latest Browse all 7550

Adding custom fields to the ticket table and sorting them

$
0
0
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


Viewing all articles
Browse latest Browse all 7550

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>