Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

Email notifications for collaborators not working like expected

We are using osTicket 1.9.1.

Here the workflow that results in unwanted email notifications:

1. User A creates a ticket by email to our osticket email address with user B added to CC email field.
2. This results in a new ticket for User A which includes User B as collaborator.
3. osTicket sends out an email to User A, confirming that the ticket was created, defined in "New Ticket Auto-response" template
4. User A replies to the newly created ticket to add some extra information
5. osTicket sends out an email to user A confirming the new message was received, defined in "New Message Auto-response" template
6. osTicket sends out an email to user B informing him about the new message from collaborator user A, defined in "New Activity Notice" template
7. User B replies to the ticket
8. osTicket sends out an email to user A informing him about the new message from collaborator "", defined in "New Activity Notice" template
9. osTicket sends out an email to user B confirming the new message was received, defined in "New Message Auto-response" template
10. osTicket sends out an email to user B informing him about the new message from collaborator "", defined in "New Activity Notice" template

Up to step 9 all is fine, but we don't understand why user B gets informed about a new message from unknown user (
%{poster.name} is empty). He should only get informed, that his message was received (step 9). It does make no difference if user B responds via osTicket link or directly by email reply.

Our new activity template looks like this:

The collaborator %{poster.name}
created a new message for ticket #%{ticket.number}
---
%{message}
---
Use this link to reply: %{recipient.ticket_link}

Is there a bug or can we configure it somehow, so that no activity notifications are sent to the user which is responsible for the activity?

Comments

  • edited June 2014
    Please report this on github.  I'll also point out this thread to the devs.

    To be clear... none of the "users" in your example are Staff right?
  • In our test user A was indeed osTicket admin (we also received staff notifications for new ticket...), I will test it later with two non staff osTicket guest users. User B is not a user of osTicket, he is just a "guest". We don't use user Authentification, but we use the ldap plugin for staff authentification.
  • After some more testing I want to add, that the problem with the empty variable %{poster.name} in my template can be resolved by using %{poster.email}. I guess osTicket can only get the posters name if the poster has an osTicket account (not the case for our testuser B). Is there a way to add some simple logic into templates?

    Something like this:
    if poster.name == "" then use poster.email

    PS: How can I report bugs on github? I don't see some kind of ticketsystem to report something? Do I need an account on github first? Perhaps you can add the bug report for me?
  • Yes you would need an account on github.
    Then you would browse to the repo and click the Issue button.
  • edited June 2014
    Here's a quick fix for that:

    in class.ticket.php, look for "function  notifyCollaborators($entry, $vars = array()) {"

    then find:
    $poster = $entry->getUser();

    replace with:
    $poster = $vars['poster']?$vars['poster']:$entry->getUser();

    find:
    $poster = $entry->getStaff();

    replace with:
    $poster = $vars['poster']?$vars['poster']:$entry->getStaff();

    then find:
    if ($autorespond && $cfg && $cfg->notifyCollabsONNewMessage())
                $this->notifyCollaborators($message, array('signature' => ''));

    replace with:
    if ($autorespond && $cfg && $cfg->notifyCollabsONNewMessage())
                $this->notifyCollaborators($message, array('signature' => '','poster'=>$vars['poster']));
Sign In or Register to comment.