Reply to Email Creates New Ticket

Helpdesk for my helpdesk software

Moderator: mkoch227

mqcarpenter
Posts: 11
Joined: Mon Mar 25, 2013 5:17 pm

Reply to Email Creates New Ticket

Post 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?
Klemen
Site Admin
Posts: 10139
Joined: Fri Feb 11, 2005 4:04 pm

Re: Reply to Email Creates New Ticket

Post by Klemen »

They should, yes,but the reply email subject must contain ticket ID in the

Code: Select all

[#XXX-XXX-XXXX]
format in the ticket subject.
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
mqcarpenter
Posts: 11
Joined: Mon Mar 25, 2013 5:17 pm

Re: Reply to Email Creates New Ticket

Post by mqcarpenter »

It does. They are just replying to the ticket responses. Let me double check
srumberg
Posts: 41
Joined: Thu Feb 07, 2013 11:33 am

Re: Reply to Email Creates New Ticket

Post 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.
Klemen
Site Admin
Posts: 10139
Joined: Fri Feb 11, 2005 4:04 pm

Re: Reply to Email Creates New Ticket

Post by Klemen »

That is correct, the email addresses must also match. Thank you for the heads up!
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
srumberg
Posts: 41
Joined: Thu Feb 07, 2013 11:33 am

Re: Reply to Email Creates New Ticket

Post 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! :D
Vincent1684
Posts: 2
Joined: Wed May 22, 2013 5:14 pm

Re: Reply to Email Creates New Ticket

Post 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)

:-)
srumberg
Posts: 41
Joined: Thu Feb 07, 2013 11:33 am

Re: Reply to Email Creates New Ticket

Post 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)
Vincent1684
Posts: 2
Joined: Wed May 22, 2013 5:14 pm

Re: Reply to Email Creates New Ticket

Post 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 .....

:lol:

If that's the case, nevermind......

(And here I thought I actually figured out a good solution)

Oh well, thanks for pointing that out. :-)
srumberg
Posts: 41
Joined: Thu Feb 07, 2013 11:33 am

Re: Reply to Email Creates New Ticket

Post by srumberg »

Sorry to rain on your idea ;-)
alfredm
Posts: 2
Joined: Sun Mar 09, 2014 6:01 am

Re: Reply to Email Creates New Ticket

Post 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.
Klemen
Site Admin
Posts: 10139
Joined: Fri Feb 11, 2005 4:04 pm

Re: Reply to Email Creates New Ticket

Post 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'] = '';
	        }
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
dnwklin
Posts: 3
Joined: Fri Jun 29, 2012 3:21 pm

Re: Reply to Email Creates New Ticket

Post by dnwklin »

Does it only work when client replied. Not staff replies?
Klemen
Site Admin
Posts: 10139
Joined: Fri Feb 11, 2005 4:04 pm

Re: Reply to Email Creates New Ticket

Post 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.
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
Ayon
Posts: 4
Joined: Tue Feb 13, 2024 7:08 pm

Re: Reply to Email Creates New Ticket

Post 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
Post Reply