glpi-project / glpi

GLPI is a Free Asset and IT Management Software package, Data center management, ITIL Service Desk, licenses tracking and software auditing.
https://glpi-project.org
GNU General Public License v3.0
4.34k stars 1.3k forks source link

Notification sending the same message to requesters/observers when emails are sent within the same minute #18371

Open prutkowski-cd opened 4 days ago

prutkowski-cd commented 4 days ago

Code of Conduct

Is there an existing issue for this?

Version

10.0.16

Bug description

We are experiencing an issue with follow-up messages (##followup.description##) where multiple follow-up messages sent within the same minute (queuednotification run frequency - 1 minute) for the same ticket result in the first follow-up message being sent multiple times in email notifications to the requester and observers.

Here is the expected behavior:

However, the actual behavior is:

This issue seems to occur when follow-up messages are added within the same minute, causing the notification system to multiply the first message in multiple notifications.

Relevant log output

Page URL

No response

Steps To reproduce

  1. [Configured ticket system in GLPI with notifications → email template shown below]
  2. Send an email to the configured mail receiver in GLPI.
  3. After receiving the notification of a new ticket creation, reply to add a follow-up message.
  4. Add a second, different follow-up message within the same minute.
  5. Check in GLPI if it received both messages at the same time. If not, repeat steps 2 and 3.
  6. Check if the mail client (receiver/observer) receives two identical email notifications, both containing the first follow-up message twice, but no email with the second follow-up message.

Your GLPI setup information

No response

Anything else?

Plugins: -MailAnalyzer - enabled and used -Ticketfilter - not used and disabled (was once enabled to check options)

Email Template in GLPI:

FOREACH LAST followups

Ticket Title: ##ticket.title##

Requesters: ##ticket.authors## Observers: ##ticket.observerusers##

IFticket.assigntousers

Technicians: ##ticket.assigntousers##

ENDIFticket.assigntousers## ##ELSEticket.assigntousers

Technicians: None assigned

ENDELSEticket.assigntousers

IFfollowup.author.email

[##followup.date##] ##followup.author.email## wrote:

ENDIFfollowup.author.email

followup.description

ENDFOREACHfollowups

prutkowski-cd commented 12 hours ago

I have verified whether the issue is related to plugins, and it is not. I restored the virtual machine to a state prior to using any plugins, and the same problem persists. It seems the issue is connected to the way notifications are processed, as all messages are correctly displayed in GLPI, but sometimes notifications sent within the same minute are sent incorrectly.