Configuring columns in the open ticket view
Moderator: mkoch227
-
- Posts: 11
- Joined: Mon Jun 17, 2013 6:10 pm
Configuring columns in the open ticket view
Script URL:
Version of script: 2.4.2
Hosting company:
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution: hesk open tickets columns
Write your message below:
Is it possible to add/remove/rearrange columns on the open tickets page? We're using HESK as an internal ticket system for ongoing projects, and the person submitting the ticket isn't necessarily the one who is working on it. I'd like to be able to view the name of the owner of the ticket, rather than the name of the person who submitted the ticket.
I looked through the inc files but couldn't figure out exactly what needs to be modified. I'm sure it can be done by changing the SQL query but my SQL skills aren't great.
Thanks.
Version of script: 2.4.2
Hosting company:
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution: hesk open tickets columns
Write your message below:
Is it possible to add/remove/rearrange columns on the open tickets page? We're using HESK as an internal ticket system for ongoing projects, and the person submitting the ticket isn't necessarily the one who is working on it. I'd like to be able to view the name of the owner of the ticket, rather than the name of the person who submitted the ticket.
I looked through the inc files but couldn't figure out exactly what needs to be modified. I'm sure it can be done by changing the SQL query but my SQL skills aren't great.
Thanks.
-
- Posts: 11
- Joined: Mon Jun 17, 2013 6:10 pm
Re: Configuring columns in the open ticket view
Ok, digging a bit more, it looks like HESK records the ticket owner as an integer which correlates to the user's ID.
So I'm trying to run this from ticket_list.inc.php inside the while($ticket=...") loop right before the info is written to the page:
$sql_name = "SELECT `name` from `hesk_users` where `id`=" . $ticket[owner];
$result_name = hesk_dbQuery($SQL);
but the page fails with "Can't execute SQL, please notify webmaster..."
Any idea what I'm doing wrong here?
So I'm trying to run this from ticket_list.inc.php inside the while($ticket=...") loop right before the info is written to the page:
$sql_name = "SELECT `name` from `hesk_users` where `id`=" . $ticket[owner];
$result_name = hesk_dbQuery($SQL);
but the page fails with "Can't execute SQL, please notify webmaster..."
Any idea what I'm doing wrong here?
-
- Posts: 11
- Joined: Mon Jun 17, 2013 6:10 pm
Re: Configuring columns in the open ticket view
Whoops, that second line should have been
Now it runs without error but it's not returning the name...
Code: Select all
$result_name = hesk_dbQuery($sql_name);
Re: Configuring columns in the open ticket view
Staff names are already defined in an array, so you could try just using
to show the name in the while loop.
So instead of you can try
Code: Select all
$admins[$ticket[owner]]
So instead of
Code: Select all
<td class="$color">$ticket[name]</td>
Code: Select all
<td class="$color">$admins[$ticket[owner]]</td>
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
-
- Posts: 11
- Joined: Mon Jun 17, 2013 6:10 pm
Re: Configuring columns in the open ticket view
That actually causes the page to come up blank... I got it working with the following code:
and then a bit lower
Seems to work well, though your way would be more straightforward and require less SQL queries.
Code: Select all
$sql_name = "SELECT `name` from `hesk_users` where `id`=" . $ticket[owner];
$result_name = hesk_dbQuery($sql_name);
$result_name2 = hesk_dbFetchAssoc($result_name);
Code: Select all
<td class="$color">$result_name2[name]</td>
-
- Posts: 11
- Joined: Mon Jun 17, 2013 6:10 pm
Re: Configuring columns in the open ticket view
I'd also like to be able to sort the rows by owner name... do you have another quick solution before I spend hours trying to figure it out?
-
- Posts: 11
- Joined: Mon Jun 17, 2013 6:10 pm
Re: Configuring columns in the open ticket view
One more thing, what's going to happen when we update to the next version? Will I lose these changes?
Re: Configuring columns in the open ticket view
I'm afraid I don't have any code/guide written to modify sorting.
And yes, a new version will overwrite any changes you make, so I would recommend keeping notes on exactly what you have changed, so you can apply that to a future version if you decide to upgrade.
And yes, a new version will overwrite any changes you make, so I would recommend keeping notes on exactly what you have changed, so you can apply that to a future version if you decide to upgrade.
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
-
- Posts: 11
- Joined: Mon Jun 17, 2013 6:10 pm
Re: Configuring columns in the open ticket view
Will do. Maybe you can work these changes into the next version 

Re: Configuring columns in the open ticket view
It won't be available in 2.5.0, because this version is almost ready for release. But maybe in one of the future ones 

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
-
- Posts: 142
- Joined: Sat Jun 22, 2013 9:24 pm
Re: Configuring columns in the open ticket view
Hello, The Owner is now a number for me (user id):
Tracking ID Created on Updated Name Subject Status Owner Last replier Sort by Priority
JZU-2NE-9ZVQ 6-Jun-2013
14:28:36 1d5h Bas * Backup Management Replied 1 Bret
What can I do to make the user id a name (this should be the assigned user)
Tracking ID Created on Updated Name Subject Status Owner Last replier Sort by Priority
JZU-2NE-9ZVQ 6-Jun-2013
14:28:36 1d5h Bas * Backup Management Replied 1 Bret
What can I do to make the user id a name (this should be the assigned user)
Re: Configuring columns in the open ticket view
Hi Bastiaan,
I actually have the same question to Klemen.
I renamed the Last replier to Owner. I need to have information who is the owner of the ticket.
When i put owner in few places it shows me the number not the owner name...
I dont need to order by it i only need to see the owner...
Klemen we need your help cheers.
I actually have the same question to Klemen.
I renamed the Last replier to Owner. I need to have information who is the owner of the ticket.
When i put owner in few places it shows me the number not the owner name...
I dont need to order by it i only need to see the owner...
Klemen we need your help cheers.
Re: Configuring columns in the open ticket view
A working solution has been posted a few replies up.
This should also work: in inc/ticket_list.inc.php find
Just ABOVE that code add
Then the $ticket[owner] variable should display the name instead of number.
This should also work: in inc/ticket_list.inc.php find
Code: Select all
echo <<<EOC
Code: Select all
$ticket['owner'] = isset($admins[$ticket['owner']]) ? $admins[$ticket['owner']] : '<i>'.$hesklang['unas'].'</i>';
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
-
- Posts: 142
- Joined: Sat Jun 22, 2013 9:24 pm
Re: Configuring columns in the open ticket view
Thanks so much for this, but the page go's blank!
Please help
Please help

Re: Configuring columns in the open ticket view
The last one I posted works for me - tested.
After echo <<<EOC make sure you use $ticket[owner] (without quotes around "owner" - this will not work: $ticket['owner'] ).
After echo <<<EOC make sure you use $ticket[owner] (without quotes around "owner" - this will not work: $ticket['owner'] ).
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