Sort by custom field in Ticket List

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
redraw
Posts: 7
Joined: Sat May 31, 2014 10:19 am

Sort by custom field in Ticket List

Post by redraw »

Script URL:
Version of script: 2.5.3
Hosting company:
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution:

Write your message below:

I've already managed to add a custom field column to the Ticket List view, however it doesn't seem that sort_possible['custom1'] would magically work... Is it possible to achieve that?

These are my changes,

Code: Select all

// in ticket_list.inc.php function hesk_print_list_head()

<th><a href="<?php echo $href . '?' . $query . $sort_possible['custom1'] . '&sort='; ?>custom1"><?php echo $hesk_settings['custom_fields']['custom1']['name']; ?></a></th>

// between echo <<<EOC block
<td>$ticket[custom1]</td>

Klemen
Site Admin
Posts: 10147
Joined: Fri Feb 11, 2005 4:04 pm

Re: Sort by custom field in Ticket List

Post by Klemen »

You will need to add custom1 to the $sort_possible variable in "inc/prepare_ticket_search.inc.php" file.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
redraw
Posts: 7
Joined: Sat May 31, 2014 10:19 am

Re: Sort by custom field in Ticket List

Post by redraw »

Thanks Klemen it worked! :) You made it flexible
Post Reply