Duplicate Agent notification for ArticleCreate event

Moderator: crythias

Post Reply
pekkaar
Znuny newbie
Posts: 41
Joined: 11 May 2010, 16:18
Znuny Version: 3.1.10
Location: Hungary

Duplicate Agent notification for ArticleCreate event

Post by pekkaar »

I have a minor issue that happens when a customer sends in a new email and a ticket is created. An excerpt from the otrs.log shows it:

[Tue Aug 10 13:14:00 2010][Notice][Kernel::System::PostMaster::NewTicket::Run] Take UserLogin (customer@company.com) from customer source backend based on (customer@company.com).
[Tue Aug 10 13:14:00 2010][Notice][Kernel::System::PostMaster::NewTicket::Run] Take UserCustomerID (Customer_A) from customer source backend based on (customer@company.com).
[Tue Aug 10 13:14:00 2010][Notice][Kernel::System::Ticket::TicketCreate] New Ticket [2010081010000171/RE: Algotech te] created (TicketID=7852,Queue=CustomerQueue,Priority=3 normal,State=new)
[Tue Aug 10 13:14:00 2010][Notice][Kernel::System::Ticket::Article::ArticleSend] Sent email to '<customer@company.com>' from 'CustomerA <customer@support.mycompany.com>'. HistoryType => SendAutoReply, Subject => [GMNT#2010081010000171] New Ticket (Customer's subject [...]);
[Tue Aug 10 13:14:00 2010][Notice][Kernel::System::Ticket::Article::SendAutoResponse] Sent auto response (SendAutoReply) for Ticket [2010081010000171] (TicketID=7852, ArticleID=15797) to '<customer@company.com>'.
[Tue Aug 10 13:14:00 2010][Notice][Kernel::System::Ticket::Event::NotificationEvent::_SendCustomerNotification] Sent agent 'MyNotification_TicketCreate' notification to 'helpdesk@mycompany.com'.
[Tue Aug 10 13:14:01 2010][Notice][Kernel::System::Ticket::Event::NotificationEvent::_SendCustomerNotification] Sent agent 'MyNotification_ArticleCreateEmailExt' notification to 'helpdesk@mycompany.com'.
[Tue Aug 10 13:14:01 2010][Notice][Kernel::System::Ticket::Event::NotificationEvent::_SendCustomerNotification] Sent agent 'MyNotification_ArticleCreateEmailExt' notification to 'helpdesk@mycompany.com'.


See the last 2 lines that shows a duplicate agent notification event fired -- whereas I would expect none at this stage.

I do have an auto-reply set up, and an agent notification for ArticleCreate (email-external) event set up. It works fine if and when the customer sends in a follow-up message later on during the life of the ticket, but why does OTRS fire my ArticleCreate notification immediately when the ticket is created?

Does the initial customer email (that generated the ticket) counts as 'email-external'? If yes, I'd understand ONE of the two notifications, but what triggered the second one?

Many thanks!

Regards,
Peter
otrs 4.0.3, mysql 5.5.15, Fedora r15
pekkaar
Znuny newbie
Posts: 41
Joined: 11 May 2010, 16:18
Znuny Version: 3.1.10
Location: Hungary

Re: Duplicate Agent notification for ArticleCreate event

Post by pekkaar »

UPDATE: it seems the root cause of this is the fact that it is not possible to set up an additional fitlering criteria in the Notification (Event) management form for ArticleSenderType (this defines whether the article was sent in by the agent, the customer or the system).

Since the Kernel::System::Ticket::Event::NotificationEvent object only considers the ArticleType, and since all inbound customer emails are of type email-external, OTRS blindly sends out my ArticleCreate (email-ext) notification even though it is only the first email from the customer at ticket generation time.

I will raise an enhancement request for this.

Regards,
Peter
otrs 4.0.3, mysql 5.5.15, Fedora r15
Post Reply