Change last replier name based on sender

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
unicorn
Posts: 5
Joined: Wed May 22, 2013 11:38 am

Change last replier name based on sender

Post by unicorn »

Script URL: internal site
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: last replier

Write your message below:
I would like to change the "Last Replier" name shown by show_tickets.php to take the name/email address from the email headers and not the name already saved in the database. This is to avoid confusions when multiple users are updating the same ticket.

Can you please let me know how to do this?
Klemen
Site Admin
Posts: 10147
Joined: Fri Feb 11, 2005 4:04 pm

Re: Change last replier name based on sender

Post by Klemen »

This makes sense.

In file "inc/pipe_functions.inc.php" try changing

Code: Select all

$ticket['lastreplier'] = $ticket['name'];
to

Code: Select all

$ticket['lastreplier'] = ($tmpvar['name'] == $hesklang['pde']) ? $tmpvar['email'] : $tmpvar['name'];
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
unicorn
Posts: 5
Joined: Wed May 22, 2013 11:38 am

Re: Change last replier name based on sender

Post by unicorn »

Hi Klemen,

I made the change as you suggested but that didn't work. System is still taking the name from the database. I am using version 2.4.2. Does that make a difference?
Klemen
Site Admin
Posts: 10147
Joined: Fri Feb 11, 2005 4:04 pm

Re: Change last replier name based on sender

Post by Klemen »

Try also changing

Code: Select all

hesk_dbEscape($ticket['name'])
to

Code: Select all

hesk_dbEscape($ticket['lastreplier'])
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
unicorn
Posts: 5
Joined: Wed May 22, 2013 11:38 am

Re: Change last replier name based on sender

Post by unicorn »

Hi Klemen,

Thanks that changed the last replier name in ticket view. However, the ticket list is still showing $ticket['name']. Any way to change it to last replier. I tried editing ticket_list.inc.php but that didn't help. Can you please help me?

Thanks in advance
Klemen
Site Admin
Posts: 10147
Joined: Fri Feb 11, 2005 4:04 pm

Re: Change last replier name based on sender

Post by Klemen »

I'm afraid that would require a bit more modifying the structure of files and variables.

Perhaps the alternative would be to just show "Customer" instead of the name in ticket list by changing

Code: Select all

$ticket['repliername'] = $ticket['name'];
to

Code: Select all

$ticket['repliername'] = 'Customer';
in ticket_list.inc.php
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