Page 1 of 1

Change last replier name based on sender

Posted: Tue Jul 23, 2013 5:21 am
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?

Re: Change last replier name based on sender

Posted: Wed Jul 24, 2013 8:45 pm
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'];

Re: Change last replier name based on sender

Posted: Thu Jul 25, 2013 9:35 am
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?

Re: Change last replier name based on sender

Posted: Thu Jul 25, 2013 9:58 am
by Klemen
Try also changing

Code: Select all

hesk_dbEscape($ticket['name'])
to

Code: Select all

hesk_dbEscape($ticket['lastreplier'])

Re: Change last replier name based on sender

Posted: Tue Aug 06, 2013 6:45 am
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

Re: Change last replier name based on sender

Posted: Tue Aug 06, 2013 5:01 pm
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