uvdesk / community-skeleton

UVdesk Opensource Community Helpdesk Project built for all to make a Full Ticketing Support System along with many more other features.
https://www.uvdesk.com
MIT License
8.53k stars 459 forks source link

Email replies cause new ticket thread #397

Closed steveb85 closed 3 years ago

steveb85 commented 3 years ago

Bug report

every email reply creates a new ticket rather than adding to the thread. Apart from this the system is working, and i can’t see any errors, In the symfony dash there is no “emails” in that section but not sure if that’s applicable. All emails are sending and receiving fine, just the new thread thing that is annoying. Ticket links work.

Latest version of UV desk Php 7.2

All other prerequisites as required. Nothing else on this server.

1. Ticket created via email    
2. Agent replies from within UVdesk
3. User replies, new ticket thread is created

Expected result

PeopleInside commented 2 years ago

Issue resolved

Hi Stephen, the issue with mac.com and UVdesk should be resolved right now.

Seems you never reply to my latest ticket created for you but your latest reply was correctly added to the test ticket and today I received a notification from the UVdesk team that confirm latest patch fix the issue.

You need take a full folder and backup of UVdesk than you can download

on your PC. Than you can unzip the content and replace this two folders in your uvdeskfolder/vendor/uvdesk/

Note: when you unzip the two folders the name of this two folders will be followed by the master world. if you want drag and drop using FTP you may need remove master world from the end of the file name or simply open the folder and transfer all content inside to the relative folder on your server.

When you done and replaced this two folders content in your server you will need clean cache with the SSH command: php bin/console c:c

Thanks to you for the report and to the UVdesk team that worked well for fix this

steveb85 commented 2 years ago

mate ! this is great, thanks so much for leading the charge, i’m impressed they fixed it so quickly,. i just sent a test ticket, and will try it and then going to set some time aside tonight to update my system, thanks again mate

Stephen Bartlett +1 646 824 8145 @.*** www.stephenbartlettmusic.com

On Sep 27, 2021, at 8:00 AM, Marco Borla @.***> wrote:

 Issue resolved

Hi Stephen, the issue with mac.com and UVdesk should be resolved right now.

Seems you never reply to my latest ticket created for you but your latest reply was correctly added to the test ticket and today I received a notification from the UVdesk team that confirm latest patch fix the issue.

You need take a full folder and backup of UVdesk than you can download support-center-boundle core-framework on your PC. Than you can unzip the content and replace this two folders in your uvdeskfolder/vendor/uvdesk/

Note: when you unzip the two folders the name of this two folders will be followed by the master world. if you want drag and drop using FTP you may need remove master world from the end of the file name or simply open the folder and transfer all content inside to the relative folder on your server.

When you done and replaced this two folders content in your server you will need clean cache with the SSH command: php bin/console c:c

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

steveb85 commented 2 years ago

FYI i sent an email to create a ticket and nothing was generated, perhaps check the cron job is working?

Stephen Bartlett +1 646 824 8145 @.*** www.stephenbartlettmusic.com

On Sep 27, 2021, at 9:08 AM, Stephen Bartlett @.***> wrote:

mate ! this is great, thanks so much for leading the charge, i’m impressed they fixed it so quickly,. i just sent a test ticket, and will try it and then going to set some time aside tonight to update my system, thanks again mate

Stephen Bartlett +1 646 824 8145 @.*** www.stephenbartlettmusic.com

On Sep 27, 2021, at 8:00 AM, Marco Borla @.***> wrote:

 Issue resolved

Hi Stephen, the issue with mac.com and UVdesk should be resolved right now.

Seems you never reply to my latest ticket created for you but your latest reply was correctly added to the test ticket and today I received a notification from the UVdesk team that confirm latest patch fix the issue.

You need take a full folder and backup of UVdesk than you can download support-center-boundle core-framework on your PC. Than you can unzip the content and replace this two folders in your uvdeskfolder/vendor/uvdesk/

Note: when you unzip the two folders the name of this two folders will be followed by the master world. if you want drag and drop using FTP you may need remove master world from the end of the file name or simply open the folder and transfer all content inside to the relative folder on your server.

When you done and replaced this two folders content in your server you will need clean cache with the SSH command: php bin/console c:c

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

PeopleInside commented 2 years ago

Hi Steve, I can see your ticket is number 21. Please check better your email. Check also in the spam and let me know if you get the notification in the spam.

PeopleInside commented 2 years ago

I see, the testing instance is not working. Email are not sent to the customer but to another email address. I'm checking why and will try to update you.

PeopleInside commented 2 years ago

Issue is not resolved, the UVdesk team seems is not right.

I am able to see issue still persist: duplicate ticket created when a reply from mac.com address is received and elaborated. I'm sorry.

vipin-shrivastava commented 2 years ago

@steveb85

We have added some fixes for this case. Please make the below updates on your project and check it if working fine for you!

Locate a path in your project. vendor/uvdesk under uvdesk folder you will see some folders.

Delete core-framework and mailbox-component folder.

Then again clone both using the below command at the same place (under vendor/uvdesk folder).

git clone https://github.com/uvdesk/core-framework git clone https://github.com/uvdesk/mailbox-component

Finally, clear your cache and make a try !!

steveb85 commented 2 years ago

@vipin-shrivastava Hi i did the update successfully, however, now I’m getting an error on the imap_open, [“exception” => ErrorException]

this wasn’t happening before, could this be something from the update? without being able to refresh the mailbox (manually or through cron) i can’t test the results.

PeopleInside commented 2 years ago

Hi @steveb85, I'm glad to see you updated UVdesk.

Please be sure to go in your UVdesk Dashboard than save all email settings again inserting one by one password of each email address.

New update can introduce email password encryption so maybe you are getting an error because of the email password issue. I hope after saving again all email settings (SwiftMailer and MailBox) your issue will be resolved.

steveb85 commented 2 years ago

hey @PeopleInside thanks, i deleted emails, and cleared cache again and it seems to be working. I’ll do some testing of the .mac emails later tonight thanks again all.

PeopleInside commented 2 years ago

I'm hapy to read that your UVdesk instance is now working @steveb85 . My thanks is to you to report such important issue and to the UVdesk team that worked to fix this very well.

steveb85 commented 2 years ago

@PeopleInside @vipin-shrivastava it looks to have worked! i’ve tested a few times and everything is going great! congrats tot he team on solving this one! A big step for us all.

regberink commented 2 years ago

I have the same issue also after updating.

Workflow -> when status changed send email. Email will not set Referenceid nor Reply-to in the header. so it will break. <- Reply fails and creates new ticket.

Workflow -> when agent reply Email will be send with the referenceid <- reply is succesfull

PeopleInside commented 2 years ago

Hi @regberink, for this let's wait developers.

@vipin-shrivastava

regberink commented 2 years ago

@PeopleInside @vipin-shrivastava

I am testing all kinds of methods everything related to a new thread(reply/create) is working fine. everythings else (change status, change priority) or whatever trigger i set. i will not add the reference id or reply-to. in the header. so it will never check back as a reply to in the system because you are checking those 2 entries. against the database if i am correct?

regberink commented 2 years ago

Ok here's the fix:

core-framework/workflow/actions/Ticket/MailCustomer.php

Add line $headers = ['References' => $entity->getReferenceIds()]; on line 72 Change Line 95 $message = $container->get('email.service')->sendMail($subject, $message, $entity->getCustomer()->getEmail()); to: $message = $container->get('email.service')->sendMail($subject, $message, $entity->getCustomer()->getEmail(),$headers);

Now its working

regberink commented 2 years ago

This will fix all emails related to MailCustomer when replying.

some nicer code:

Change } else { $message = $container->get('email.service')->sendMail($subject, $message, $entity->getCustomer()->getEmail(),$headers); } To:

} else { if (!empty($entity->getReferenceIds())) { $headers = ['References' => $entity->getReferenceIds()]; } $message = $container->get('email.service')->sendMail($subject, $message, $entity->getCustomer()->getEmail(),$headers); }

papnoisanjeev commented 2 years ago

@regberink

Please create a pull request for the suggested changes if everything works well we will merge it with main repository of project And you will also become a contributor for project as well :100:

PeopleInside commented 2 years ago

I never yet tested this. I'm trying to save the edit on my repo and maybe now I see I create a pull request. The code need to be tested and reviewed. Feel free to open a new pull request if mine is not right or want create one with your profile.

regberink commented 2 years ago

i have never done a pull request all is fine by me if you do it. but this one is nicer if you would like to change the code:

} else { $message = $container->get('email.service')->sendMail($subject, $message, $entity->getCustomer()->getEmail(),$headers); } To:

} else { if (!empty($entity->getReferenceIds())) { $headers = ['References' => $entity->getReferenceIds()]; } $message = $container->get('email.service')->sendMail($subject, $message, $entity->getCustomer()->getEmail(),$headers); }

PeopleInside commented 2 years ago

In my pull request I done also this changes. Just need check if my pull request is fine, the UVdesk team will check it :)

Thanks for this!

vipin-shrivastava commented 2 years ago

@PeopleInside

We will check & If everything works fine then we will merge it.

@PeopleInside @regberink Thanks, for your contribution.