Since around March of this year our osTicket system started posting duplicate tickets and duplicate threads.I've tried everything method I know of to troubleshoot and identity where and why this is occurring.  I've even implemented a catch condition to check the db tables prior to inserting tickets and threads to see if the contents of the $vars's match what is already in the DB tables.No success to solve this problem whatsoever.I've Googled it and see where this issue has been in existence and dates back a number of years.Does any one have a solution on how to stop osTicket from consistently creating ducpliate tickets and threads?

Please help us to help you by reading and following the posting guidelines located in this thread: Please read before requesting assistance.  The more information you give us the better we will be able to assist you. Thank you.Version of osTicket?HAve you added the ticket# to the subject of the email templates?Are the people replying the ticket owner or an agent?Are you collecting tickets via IMAP or POP?What are you doing with the emails afterwards?

Version of osTicket?one system is running 1.6one system is running 1.7Have you added the ticket# to the subject of the email templates?Ticket #90614 (I think this is what you are looking for here)Are the people replying the ticket owner or an agent?ticket ownerAre you collecting tickets via IMAP or POP?direct, through web interfaceWhat are you doing with the emails afterwards?deleteing them

Neither of those versions are supported anymore.  I would recommend that you update.

but it should not matter as the same issue is happening in all versions up to the latest according to Google search results

Has anyone come up with a clever solution to this?I tried the following from piecing together suggestions others have made out there in the various osTicket up through v1.10. Here is the code I tried. It actually worked for 2-days straight, then began to fail again yesterday.Inserted around line 2498 in ./include/class.ticket.php right before `if($errors)  return 0;`.`/**  * J.Doe added to intercept duplicate ticket entries.  * Updated:   2017-06-12  * @[deleted]    John Doe <jd@example.com>  */  $sql1='    SELECT ticketID FROM ost_ticket    WHERE          source      = "' . $vars . '"      AND topic_id    = "' . $vars . '"      AND url         = "' . $vars . '"      AND priority_id = "' . $vars . '"      AND duedate     = "' . date( 'Y-m-d H', strtotime( $vars . ' ' . $vars ) ) . '"      AND team_id     = "' . $vars . '"      AND subject     = "' . $vars . '"      AND dept_id     = "' . $vars . '"      AND email       = "' . $vars . '"      AND name        = "' . $vars . '"  ';  $sql2='    SELECT id FROM ost_ticket_thread    WHERE          staff_id = "' . $vars . '"      AND poster   = "' . $vars . '"      AND title    = "' . $vars . '"      AND body     = "' . $vars . '"  ';  $res1=db_query($sql1);  $res2=db_query($sql2);  if( ( $res1 && db_num_rows( $res1 ) ) || ( $res2 && db_num_rows( $res2 ) ) ) {      header( 'Location: http://example.com/workorders/' );      exit;  }        //Any error above is fatal.        if($errors)  return 0;`

Has anyone ever tackled this issue?

Considering barely anyone uses versions that old, I do not think that you will get much traction on this thread.We do not have the problem with more contemporary versions.  The way emails become tickets and updates are made has changed dramaticly from back then.

If you Google this issue, there are dozens of posts relating to this specific problem.All I am interested in knowing is where and how someone honed in on where to fix it. Just even a hint.I cannot upgrade because we have customized the product since install in 2013 and there is no overlay or plugin facility available to extend this product. So core code updating needed to be done..Once installed we did not touch at all.Now in March of this year practically every ticket post is duplicated. When I researched it I found many, many people reporting the same issue. Clearly something happened in osTicket.I don't know what it is or why. But If I can just figure out where to cut it off that will make the product work effectively.So far I tracking through every "INSERT INTO..." and changing to INSERT IGNORE INTO..." praying that will solve the issue.Thanks for chiming in @[deleted]

When i google about duplicate tickets and osticket, i can't find alot, but the ones i find are not relating to 1.10, also the topics that do discuss the problem suggest problems with xampp, proxy, refreshing page and email clients that don't honor RFC.

a year later

I am having this issue on version 1.10. Just started happening a week or two ago. Version of osTicket? 1.10Have you added the ticket# to the subject of the email templates? The Ticket number is in the email subjectAre the people replying the ticket owner or an agent? BothAre you collecting tickets via IMAP or POP? No. Web Only.What are you doing with the emails afterwards? N/A

Write a Reply...