Page 1 of 1

Owner sort order for staff

Posted: Wed Sep 17, 2014 3:48 pm
by Josh
Script URL: intranet
Version of script: 2.5.2
Hosting company: self
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution: "Users sort"

Write your message below:

We've been using this script for quite some time. I purchased a 3 site license and upgraded to 2.5.2. Great stuff. We just went over 10k in tickets!

There's 1 item perhaps you could help with. As we've added staff over time our user list has grown. We're up to about 25 users, but in the _users table there's no sort order. If possible I'd like to sort alphabetically so when assigning an owner the list would be less hunt and peck (similar to the category table and its cat_order column.

I'm not sure if this would be something on the script or db side. Any help is appreciated.

Josh

Re: Owner sort order for staff

Posted: Wed Sep 17, 2014 4:47 pm
by Klemen
Actually I have this change ready for the next HESK release.

You can apply it to the current version by changing this exact code:

Code: Select all

users` ORDER BY `id`
to

Code: Select all

users` ORDER BY `name`
(be careful about ` chars, change the code exactly as posted)

in files:

admin/admin_ticket.php
admin/export.php
admin/mail.php
admin/manage_users.php
admin/new_ticket.php
admin/reports.php

Re: Owner sort order for staff

Posted: Wed Oct 01, 2014 4:03 am
by Josh
Confirmed working . . . as if there were a doubt.

Any way to show tickets grouped by owner alphabetically as well?

Thanks!

Re: Owner sort order for staff

Posted: Wed Oct 01, 2014 2:26 pm
by Klemen
That one's a bit more tricky, you would have to develop a "CASE" logic for the SQL query to order numerical owner ID's based on the name associated with that ID (or do a join, but that would effect performance on large databases). I can't help with the exact code here though, sorry.