HelpDesk Listing
From PhpCOIN Documentation
The HelpDesk listing can be viewed by a logged-in admin, or by a logged-in client. It allows an admin to see a listing of all your support tickets in one place, while a client can see all their own support tickets in one place.
You can specify how may support tickets should be listed per page via Admin -> Parameters -> common -> helpdesk -> Listing Items Per Page for: HelpDesk
You can also specify whether or not the client name will be displayed on HelpDesk Listings. The option is chosen via Admin -> Parameters -> common -> helpdesk -> Helpdesk Admin List Show Client Name
The default listing sort is by Record ID in DESCending order. You can edit the source code to change what the sort is, as well as the order. In file /coin_modules/helpdesk/helpdesk_funcs.php find the function do_select_listing_tickets(). Within that function is the following code block:
# Set Order ASC / DESC part of sort
IF (!$adata['so']) {$adata['so'] = 'D';}
IF ($adata['so'] == 'A') {$order_AD = ' ASC';}
IF ($adata['so'] == 'D') {$order_AD = ' DESC';}
Set the first line to A or D, depending on whether you want ASCending or DESCending sort
Immediately below that block is:
# Set sort orders
IF (!$adata['sb']) {$adata['sb'] = '1';}
IF ($adata['sb'] == '1') {$_order = ' ORDER BY '.$_DBCFG['helpdesk'].'.hd_tt_id
'.$order_AD;}
IF ($adata['sb'] == '2') {$_order = ' ORDER BY '.$_DBCFG['clients'].'.cl_name_last
'.$order_AD.', '.$_DBCFG['clients'].'.cl_name_first '.$order_AD;}
IF ($adata['sb'] == '3') {$_order = ' ORDER BY '.$_DBCFG['helpdesk'].'.hd_tt_time_stamp
'.$order_AD;}
IF ($adata['sb'] == '4') {$_order = ' ORDER BY '.$_DBCFG['helpdesk'].'.hd_tt_subject
'.$order_AD;}
IF ($adata['sb'] == '5') {$_order = ' ORDER BY '.$_DBCFG['helpdesk'].'.hd_tt_priority
'.$order_AD;}
IF ($adata['sb'] == '6') {$_order = ' ORDER BY '.$_DBCFG['helpdesk'].'.hd_tt_status
'.$order_AD;}
IF ($adata['sb'] == '7') {$_order = ' ORDER BY '.$_DBCFG['helpdesk'].'.hd_tt_closed
'.$order_AD;}
Set the first line to the number of the ORDER BY fields that you want.

