Page 1 of 1

Sort by custom field in Ticket List

Posted: Sat Jun 28, 2014 9:17 pm
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>


Re: Sort by custom field in Ticket List

Posted: Sun Jun 29, 2014 9:05 am
by Klemen
You will need to add custom1 to the $sort_possible variable in "inc/prepare_ticket_search.inc.php" file.

Re: Sort by custom field in Ticket List

Posted: Sun Jun 29, 2014 9:10 pm
by redraw
Thanks Klemen it worked! :) You made it flexible