Hello,
I am a new user. A month ago, I started looking at osTicket for my single-user, low-volume helpdesk system and have been experimenting with the product since.
See attached for my installation info. I am using the latest available version. osTicket is installed inside an Ubuntu 24.04 VM running on my MacBook M2 laptop.
I setup the admin user and email during the installation setup. I then added a single agent in osTicket. I setup the system email as my gmail account which has historically served as my helpdesk. I turned off all alerts, imported all my clients as users, setup my gmail as my Remote and Outgoing mailbox, with the fetch folder as Helpdesk and Fetch Folder Action to Archive/Move to Folder: Tickets. Helpdesk and Tickets are gmail labels I use to place the conversations in Helpdesk folder and after osTicket processes them, get them moved to Tickets folder.
With this setup, I have done hundreds of experiments to fetch my gmail conversations and expecting them to get converted to 1 ticket per conversation. But it's not consistent. Sometimes, it works as expected, but most of the times, it creates duplicate tickets for the same conversation. And the duplicates are not the same number either. Sometimes 2, sometimes 3 and so on.
So I tried to bypass the default fetch sequence by setting fetch interval to 1 (minute) and fetch size to 1 (email). And I did the following steps:
- Place exactly 1 email message from a conversation in chronological sequence in Helpdesk.
- Manually invoke cron.php from the command line.
- Check ticket has been created
- Wait 1 minute for fetch interval to lapse
- Ensure the message has moved from Helpdesk to Tickets (in Gmail)
- Place the next chronologically correct message from the same conversation into Helpdesk
- Manually invoke cron.php again
- osTicket creates a second ticket instead of attaching to the already existing one
Very rarely, it does it correctly by attaching to the same ticket and I couldn't find any consistent way to reproduce the circumstances under which it processes emails correctly.
I have poured over the archives and found this issue reported many times from a decade ago, but didn't find any concrete resolution to the problem, so I am seeking help here again.
Mine is a low volume, single user scenario (at most 2-3 tickets a month), but I do have 20 years of service records sitting in Gmail that I would like to import first, before starting to use the GUI for future tickets.
With the help of chatGPT, I created 21 versions of the importer script and nothing seemed to work. Tried invoking the cron for 1 message at a time, tried invoking the TicketController() api, tried manipulating ThreadEntry directly by injecting the ticket number into ThreadEntry calls and nothing worked. chatGPT's latest version 21 even went so far as manipulating the sequence to fetch the ticket number after the first message, then modify the subject for subsequent messages (within the same conversation) to prepend the ticket number based on the format from a test ticket created via GUI. Even that didn't work!
Then there's other inconsistencies in how emails get processed. Consider the following scenarios:
Scenario 1: Use GUI to create ticket
When I go to New Ticket form, I am asked to fill out User and Collaborators, then subject and message. Then choose the system email id (not agent email id) to post the ticket. The ticket that is created has From: showing the User on the Open Tickets tab, which is what I expect.
Scenario 2: Import 1 email from Helpdesk
When the first email in the conversation thread was sent from my gmail account and this gets imported, it does 2 unexpected things. First, it creates that email as a user in osTIcket even though it is clearly registered as a system email (and all settings reflect outgoing mails to use system emails, not agent emails). And second, it shows From: as the newly created user (for system email) and the actual users are attached as collaborators to the ticket. Only time the From: is shown correctly is when the customer initiated the conversation first and I replied to that as a consequence.
These are only the start of my problems. I also noticed that all imported emails are being created as tickets with today's timestamp, when I would expect them to create tickets with timestamps from the gmail thread. But I found a script from the archives (parseDatesFromImapEmailHeaders.sql) that seems to fix this after the fact. But I haven't gotten to this step yet because I am still struggling with getting osTicket to import my gmails correctly.
Am I missing something basic in my setting? Seems like this email import is something everyone would want to see function properly before migrating massive amounts of historic data.
Please help. I am now at the point of giving up!
Cheers.