Script URL: internal
Version of script: 2.4 RC
Hosting company: internal
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution: Group Owner
Write your message below:
When using Group by Owner, is there a way to have the logged in owners tickets be the top group below the unassigned? So if Steve logs in, his tickets are the top group. If Ted logs in, then Ted's tickets are the top group and not have to scroll down the page to see his tickets. I dont care if "unassigned" are the top most group.
Group by Owner display
Moderator: mkoch227
Re: Group by Owner display
Good idea!
Now, I haven't had time to test this thoroughly, but it seems to work just fine:
1. open file "inc/prepare_ticket_search.inc.php"
2. find this code
3. just BELOW that code paste
4. Save, upload and test.
Now, I haven't had time to test this thoroughly, but it seems to work just fine:
1. open file "inc/prepare_ticket_search.inc.php"
2. find this code
Code: Select all
if ($group == 'priority' && isset($_GET['sort']) && $_GET['sort'] == 'priority')
{
// No need to group by priority if we are already sorting by priority
}
Code: Select all
elseif ($group == 'owner')
{
$sql .= " CASE WHEN `owner` = '".hesk_dbEscape($_SESSION['id'])."' THEN 1 ELSE 0 END DESC, ";
}
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
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


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
Re: Group by Owner display
Close....
It did group the owner at the top, but all the other tickets not owned by him were scattered below. The unassigned or owned by other people were not grouped together. Made it hard to find unassigned tickets.
It did group the owner at the top, but all the other tickets not owned by him were scattered below. The unassigned or owned by other people were not grouped together. Made it hard to find unassigned tickets.

Re: Group by Owner display
How about
Code: Select all
elseif ($group == 'owner')
{
$sql .= " CASE WHEN `owner` = '".hesk_dbEscape($_SESSION['id'])."' THEN 1 ELSE 0 END DESC, `owner` ASC, ";
}
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
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


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
Re: Group by Owner display
With the two logins I had to test with look good. This will be the icing on the cake!!!