Page 1 of 1

How can you show tickets based on criteria?

Posted: Mon Nov 23, 2009 9:54 pm
by akash
Hi all,

Developing locally on the latest version and was wondering how it would be possible to view tickets in the admin panel based on a certain criteria?

For example, show tickets where Custom1 = 'hello'

I understand this is modification and is not supported but I assume it's a fairly simple one to answer.

I also understand its the print_tickets.inc.php to edit where the following is the start of where it selects tickets etc but I can't figure out where to put my bit:

$sql = 'SELECT * FROM `'.hesk_dbEscape($hesk_settings['db_pfix']).'tickets` WHERE ';

if (!empty($_GET['archive']))
{
$archive=1;
$sql .= '`archive`=\'1\' AND ';
}
else




Would appreciate any help on this!

Thanks
Akash

Posted: Mon Nov 23, 2009 10:58 pm
by akash
Nevermind, fixed
I was being silly and forgetting to use the AND function straight after so it was falling over