Change Sort Default

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
RazorElite
Posts: 5
Joined: Sat Mar 17, 2007 3:36 pm

Change Sort Default

Post by RazorElite »

Hi, is there anyway to change how tickets are sorted by default. The default sort method is to sort by Priority. However, I rather sort my tickets by date, but it is time consuming to sort them each time I answer a ticket. So is there anyway to always have the tickets sorted by another option?

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

Post by Klemen »

In the file inc/print_tickets.inc.php line 54 assigns the default value for sorting:

Code: Select all

$sort = hesk_input($_GET['sort']) or $sort='priority';
You can change 'priority' to some other default option:
trackid (ticket tracking ID)
dt (date)
and also name, subject, status

Note though that date is the date of creation of ticket, not last reply. That's coming in next version, but too complicated in this one to explain
viewtopic.php?t=1325
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
RazorElite
Posts: 5
Joined: Sat Mar 17, 2007 3:36 pm

Post by RazorElite »

Worked great. Thanks. Now Hesk is perfect for me. Way better than my last helpdesk software.
gavking
Posts: 2
Joined: Tue Mar 27, 2007 12:54 pm

Post by gavking »

What exactly needs to be done to make it sort descending? I've done the above and that works, but i'd like to see the oldest open tickets first.

Regards,
Gavin.
Regards,

Gavin King
Klemen
Site Admin
Posts: 10142
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Hmm, try changing

Code: Select all

if (isset($_GET['asc']) && $_GET['asc']==0) {$sql .= " DESC ";$asc=0;$asc_rev=1;}
else {$sql .= " ASC ";$asc=1;$asc_rev=0;}
to

Code: Select all

if (isset($_GET['asc']) && $_GET['asc']==0) {$sql .= " ASC ";$asc=0;$asc_rev=1;}
else {$sql .= " DESC ";$asc=1;$asc_rev=0;}
Didn't test it though
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
Post Reply