Skip to content

webhook triggering in private follow-up notification #58

@lucaslevi-consultor-glpi

Description

Good evening,

I noticed a behavior in the plugin that I believe can be adjusted. What happens: when a follow-up notification is private, normally the person shouldn't receive it. For example: if it's an e-mail notification, glpi itself doesn't generate the notification to be sent because it knows that the follow-up or task is private.

I noticed that the plugin is triggering a private follow-up and repeating the last public follow-up, i.e. it doesn't actually show the last message, but it still triggers the webhook unnecessarily.
How to reproduce :

add the new followup event in the glpi to activate the webhook and in the notification itself (body of the message) use this as an example :

"ticketAuthor": "##ticket.authors##",
"ticketTitle": "##ticket.title##",
"ticketId": "##ticket.id##",
"followUp": "##FOREACH LAST 1 followups##[##followup.date##] - ##followup.author##: ##followup. description####ENDFOREACHfollowups##",
"model": "followup",
"Private": "##FOREACH LAST 1 followups## ##followup.isprivate####ENDFOREACHfollowups##"

Create a public followup and notice the message sent - so far so good

Create a private followup and notice that the message is also sent - which shouldn't happen

ps : this also applies to private tasks

Translated with DeepL.com (free version)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions