HelpDeskZ Community
BUG: Email notifications - New Tickets [SOLVED] - Printable Version

+- HelpDeskZ Community (http://community.helpdeskz.com)
+-- Forum: HelpDeskZ 2 (http://community.helpdeskz.com/forum-3.html)
+--- Forum: Support (http://community.helpdeskz.com/forum-5.html)
+--- Thread: BUG: Email notifications - New Tickets [SOLVED] (/thread-2308.html)



BUG: Email notifications - New Tickets [SOLVED] - Luukullus - 08-04-2022

Good evening,

I've noticed other bugs for which I haven't found a workaround or fix yet.

I know there are already some similar tickets, but somehow nearly nobody here can write a correct thread.

I noticed that the email notification related to the email templates does not work properly.

When creating tickets, we now have to observe three different procedures.
1. Create tickets via the helpdesk with or without user registration, the user registration is irrelevant.
2. Create tickets via the staff area, by an agent or admin
3. Automatically create tickets via email, i.e. IMAP fetching.


Let's now take procedure 1:
Notification emails for a newly created ticket to the creator and to the support staff arrive. Everythign is fine here!

Let's now take procedure 2:
Notification email for a new created ticket to the creator arrives, but not correctly. An email with the subject RE [#Ticketnumber] arrived immediately. So a reply notification and no notification of opening.
The agents don't get a notification (maybe it's okay if an agent creates this. But it's set and there is no separation....)

Let's now take procedure 3:
Notification email for a new created ticket to the support employee arrives. But not to the customer who sent in an email ticket.
That's my biggest problem.... The customer should always get something like this...

Can you help me/us with this?

Greeting Luuk


RE: BUG: Email notifications - New Tickets - Luukullus - 08-08-2022

Okay i found the reason why thats is happening.

For Example in the MailFetcher.php (the library one), wich contents the functions needed to create new tickets from mails. There is only the Staffnotification in the end:


Code:
        }else{
            $ticket_id = $ticket->id;
            $message_id = $tickets->addMessage($ticket_id, $body, 0, false);
            $tickets->updateTicketReply($ticket_id, $ticket->status);
        }
        $tickets->staffNotification($ticket);
        return [$ticket_id,$message_id];
    }


Well, i never thought it would be that simple. I love the source of HelpdeskZ and the more i work with it, i also learn how to get things done very easy compared to my complicated working dumb brain xD..
Simply change the code above to the following and you will get also client emails sent when fetching an email ticket (code found in hdz/app/Libraries/MailFetcher.php on line 175):

Code:
        }else{
            $ticket_id = $ticket->id;
            $message_id = $tickets->addMessage($ticket_id, $body, 0, false);
            $tickets->updateTicketReply($ticket_id, $ticket->status);
        }
        $tickets->newTicketNotification($ticket);
        $tickets->staffNotification($ticket);
        return [$ticket_id,$message_id];
    }