Menu

Person mentioned on Ticket not working for me

2022-11-01
2024-05-03
  • Pablo Chamorro

    Pablo Chamorro - 2022-11-01

    I have the mail to ticket feature working with iTop 3.0.2, but I don't know how to trigger the Person mentioned on Ticket notification. Could you please help me?

    In configuration I have:

    'mentions.allowed_classes' => array('@' => 'Person', '?' => 'User'),

    I would like to send email to create tickets (this works) and to notify to certain users using for example, @username or @First Name or @Last Name, or @First Name Last Name, pero none works for me. Only the ticket creation mail is sent.

    I'm trying with the Person mentioned on Ticket example included in the install demo of itop but it doesn't work for me.

    Trigger

    Description: Person mentioned on Ticket
    Contexts: Console, Portal
    Target class: Ticket
    Filter: SELECT Ticket WHERE operational_status != 'closed'
    Mentioned filter: SELECT Person AS p WHERE p.org_id = :this->org_id

    Triggered action:

    Name: Email mentioned person
    Status: In production

    From (email): $current_contact->email$
    To: SELECT Person WHERE id = :mentioned->id
    Subject: You have been mentioned in "$this->friendlyname$"
    Body: Hello $mentioned->first_name$,

    You have been mentioned by $current_contact->friendlyname$ in $this->hyperlink()$

    importance: normal

    Thank you

     
  • Pierre Goiffon

    Pierre Goiffon - 2022-12-16

    Hello,

    Mail to Ticket extension allows to create ticket by reading a mailbox.

    You are referring to user mentions, which is another thing : it's a new functionality added in iTop 3.0.0. It's actually a new type of the existing notification system.
    To learn more about them, take a look here : https://www.itophub.io/wiki/page?id=3_0_0:release:3_0_whats_new#mention_user

     
  • Pablo Chamorro

    Pablo Chamorro - 2022-12-16

    Thank you very much. It's working now. I included this in the custom body message to send:

    Hi $mentioned->first_name$,

    You has been mentioned by $current_contact->friendlyname$ in $this->hyperlink()$

    Last message in public log:

    $this->head_html(public_log)$

    Last message in privatelog:

    $this->head_html(private_log)$

     
    🎉
    1
  • Pierre Goiffon

    Pierre Goiffon - 2022-12-19

    Thanks for the feedback !

     
  • Bruno Martins

    Bruno Martins - 2023-02-02

    Thanks for sharing, Pablo!

    How do you handle the case where either the public or the private log are empty? It seems that the variable will not be converted to a null value?
    And also, are you getting a "TEST () - Errors: Some recipients were invalid." in the notification log? I do, and I am only specifying one recipient, which is weird...

    Have a lovely day!

     
  • Pierre Goiffon

    Pierre Goiffon - 2023-02-13

    Hello,

    How do you handle the case where either the public or the private log are empty?

    We were talking about the on mention trigger : the mentions are contained in caselog. What use case did you had in mind ?

    "TEST () - Errors: Some recipients were invalid."

    You should open a dedicated thread on this topic ?

     
  • Bruno Martins

    Bruno Martins - 2023-02-14

    The invalid recipients error message is solved. I was missing a recipient for the test notifications.

    For the public/private log being empty, my use case the one where you may have comments on the private log, but not on the public one, and then the sent notification is still sending the information about the public log, whoever since it is empty, the variable itself is displayed, instead of being replaced with a null value.

     
  • Pierre Goiffon

    Pierre Goiffon - 2023-03-16

    Hello,

    For the public/private log being empty, my use case the one where you may have comments on the private log, but not on the public one, and then the sent notification is still sending the information about the public log, whoever since it is empty, the variable itself is displayed, instead of being replaced with a null value.

    Can you share your notification configuration ? Both trigger and action ?

     
  • mohamed ez

    mohamed ez - 2024-05-03

    Hello,
    I have same problem, can you help me plzz

    In configuration I have:

    'mentions.allowed_classes' => array('@' => 'Person', '?' => 'User'),

    Trigger

    Description: Person mentioned on Ticket
    Contexts: Console, Portal
    Target class: Ticket
    Filter: SELECT Ticket WHERE operational_status != 'closed'
    Mentioned filter: SELECT Person AS p WHERE p.org_id = :this->org_id

    Triggered action:

    Name: Email mentioned person
    Status: In production

    From (email): $current_contact->email$
    To: SELECT Person WHERE id = :mentioned->id
    Subject: You have been mentioned in "$this->friendlyname$"
    Body: Hello $mentioned->first_name$,

    You have been mentioned by $current_contact->friendlyname$ in $this->hyperlink()$

    importance: normal

    Thank you

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.