Page 1 of 2
Reply to Email Creates New Ticket
Posted: Tue Apr 16, 2013 4:47 pm
by mqcarpenter
HESK version: 2.4.2 - Check for updates
PHP version: 5.2.17
MySQL version: 5.5.30-cll
/hesk_settings.inc.php Exists, Writable
/attachments Exists, Writable
Write your message below:
I have noticed that when a user replies to a ticket, it is creating a new ticket. This does not seem to be normal. Shouldn't replies with the ticket information in the subject add to the existing ticket?
Re: Reply to Email Creates New Ticket
Posted: Tue Apr 16, 2013 5:31 pm
by Klemen
They should, yes,but the reply email subject must contain ticket ID in the
format in the ticket subject.
Re: Reply to Email Creates New Ticket
Posted: Wed Apr 17, 2013 1:10 pm
by mqcarpenter
It does. They are just replying to the ticket responses. Let me double check
Re: Reply to Email Creates New Ticket
Posted: Wed Apr 24, 2013 5:09 pm
by srumberg
I believe that the sender's email address must also match the email address associated with the ticket.
In other words, if they sumbit the ticket using "
joe@domain.com" and later reply from "
joe_home@domain.com", it will create a new ticket.
Re: Reply to Email Creates New Ticket
Posted: Wed Apr 24, 2013 5:29 pm
by Klemen
That is correct, the email addresses must also match. Thank you for the heads up!
Re: Reply to Email Creates New Ticket
Posted: Wed Apr 24, 2013 5:43 pm
by srumberg
But the good news is that HESK has a MERGE TICKET function -- perfect for this situation:
From the admin menu, select TICKETS. Make sure the list displays the 'original' ticket and the 'new' (duplicate) ticket.
Checkmark BOTH tickets, then select "Merge selected tickets" from the dropdown box at the bottom right, then click EXECUTE.
The new (duplicate) ticket will be added to the bottom of the original (older) ticket, preserving the communication chain of both tickets.
Nice work, Klemen!

Re: Reply to Email Creates New Ticket
Posted: Wed May 22, 2013 6:42 pm
by Vincent1684
Hi Everyone,
I figured out a way to better solve this problem.
Within the "text.php" file you can make a small modification so that the Reply Emails the Customer gets will include the Ticket ID within the Subject line so that when they reply to the email it adds to that current ticket instead of creating a whole new ticket. Especially when they send a Thank You after you have closed the ticket.
Here is the tidbit of code to change:
Code: Select all
// EMAIL SUBJECTS
$hesklang['new_ticket_staff'] = '[#%%TRACK_ID%%] New ticket: %%SUBJECT%%';
$hesklang['ticket_received'] = '[#%%TRACK_ID%%] Ticket received: %%SUBJECT%%';
$hesklang['ticket_assigned_to_you'] = '[#%%TRACK_ID%%] Ticket assigned: %%SUBJECT%%';
$hesklang['new_reply_by_customer'] = '[#%%TRACK_ID%%] New reply to: %%SUBJECT%%';
$hesklang['new_reply_by_staff'] = '[#%%TRACK_ID%%] New reply to: %%SUBJECT%%';
$hesklang['category_moved'] = '[#%%TRACK_ID%%] Ticket moved: %%SUBJECT%%';
$hesklang['new_note'] = '[#%%TRACK_ID%%] Note added to: %%SUBJECT%%';
$hesklang['new_pm'] = 'New private message: %%SUBJECT%%';
$hesklang['forgot_ticket_id'] = 'List of your support tickets';
$hesklang['new_reply_by_staff'] = '[#%%TRACK_ID%%] Support Staff Has Updated Your Ticket';
$hesklang['notify_all'] = 'Notify HelpDesk Crew of reply';
$hesklang['new_reply_by_staff'] = '[#%%TRACK_ID%%] Support Staff Has Updated Your Ticket';][/color]
In a default installation I think you will see this line only once, I'm not sure because I added some custom lines to allow for an All Agent notification when tickets are worked on. but if you simply add the "#%%TRACK_ID%%" object variable it will add the ID Number to all tickets so that new tickets aren't created when the customer replies.
Hope this helps everyone.
(Not to rain on srumberg's suggestion of the Merge ticket option, I personally find it to be a bit of a chore once you have several people replying to their tickets and HESK just creates a new one for each)

Re: Reply to Email Creates New Ticket
Posted: Wed May 22, 2013 6:57 pm
by srumberg
Srumberg is not worried about a little rain but I'm not seeing what you have done differently than already exists in the original code. [#%%TRACK_ID%%] already exists in each of the settings that I see.
You have entered the setting $hesklang['new_reply_by_staff'] twice (the second one overriding the first, of course) but the original value does contain [#%%TRACK_ID%%].
(File: language/(language code)/text.php)
Re: Reply to Email Creates New Ticket
Posted: Wed May 22, 2013 7:12 pm
by Vincent1684
Really???
Interesting maybe I did something to it previously (Can't remember from 6 months ago when I installed HESK) .... hmmm then by default this small issue no longer exists if what you are saying is correct then take away the 2nd entry and that text.php would be the typical default code .....
If that's the case, nevermind......
(And here I thought I actually figured out a good solution)
Oh well, thanks for pointing that out.

Re: Reply to Email Creates New Ticket
Posted: Wed May 22, 2013 9:04 pm
by srumberg
Sorry to rain on your idea

Re: Reply to Email Creates New Ticket
Posted: Sun Mar 09, 2014 6:07 am
by alfredm
Klemen wrote:That is correct, the email addresses must also match. Thank you for the heads up!
Is there a way to ignore the sender email addresses, and only look at the ticket ID when the system looks at the ticket? I have the original ticket coming in as an email that is generated from a form on one of my sites, but when the customer replies from their personal email address, Hesk creates a new ticket. Having it ignore the originating email address would allow this to work perfect for me.
Re: Reply to Email Creates New Ticket
Posted: Sun Mar 09, 2014 11:59 am
by Klemen
Deleting this code from inc/pipe_functions.inc.php should do the trick:
Code: Select all
// Do email addresses match?
if ( strpos( strtolower($ticket['email']), strtolower($tmpvar['email']) ) === false )
{
$tmpvar['trackid'] = '';
}
Re: Reply to Email Creates New Ticket
Posted: Wed Mar 12, 2014 3:47 pm
by dnwklin
Does it only work when client replied. Not staff replies?
Re: Reply to Email Creates New Ticket
Posted: Wed Mar 12, 2014 5:00 pm
by Klemen
No staff replies, no, because it is very hard to ensure legitimacy of sent mail. For example I can easily generate an email that appears to have been sent from your email address.
Making staff replies work would require a robust sender verification system, such as PGP signatures, and is not something planned for HESK.
Re: Reply to Email Creates New Ticket
Posted: Tue Feb 13, 2024 7:32 pm
by Ayon
I am having the same problem. Did anyone find a fix for this?
The text.php file has the [#%%TRACK_ID%%] code on every reply subject line, and the ticket emails all have the tracking ID in the subject line. Yet, it still opens a new ticket with every reply to each email. It is just bloating the ticket system and no true analysis can be extracted. Here is the code in the text.php file:
(remove extra text)
// EMAIL SUBJECTS
$hesklang['new_ticket_staff'] = '[#%%TRACK_ID%%] New ticket: %%SUBJECT%%';
$hesklang['ticket_received'] = '[#%%TRACK_ID%%] Ticket received: %%SUBJECT%%';
$hesklang['ticket_assigned_to_you'] = '[#%%TRACK_ID%%] Ticket assigned: %%SUBJECT%%';
$hesklang['new_reply_by_customer'] = '[#%%TRACK_ID%%] New reply to: %%SUBJECT%%';
$hesklang['new_reply_by_staff'] = '[#%%TRACK_ID%%] New reply to: %%SUBJECT%%';
$hesklang['category_moved'] = '[#%%TRACK_ID%%] Ticket moved: %%SUBJECT%%';
$hesklang['new_note'] = '[#%%TRACK_ID%%] Note added to: %%SUBJECT%%';
$hesklang['new_pm'] = 'New private message: %%SUBJECT%%';
$hesklang['forgot_ticket_id'] = 'List of your support tickets';
$hesklang['ticket_closed'] = '[#%%TRACK_ID%%] Ticket closed/resolved'; // New in 2.6.0