osTicket / osTicket

The osTicket open source ticketing system official project repository, for versions 1.8 and later
osticket.com
GNU General Public License v2.0
3.26k stars 1.67k forks source link

Intended use of Alerts for "Assigned Agent/Assigned Team" #6659

Closed digidigital closed 1 month ago

digidigital commented 9 months ago

Prerequisites

Description

The alerts guide https://docs.osticket.com/en/latest/Guides/Alerts%20Guide.html has this description for "New Internal Activity Alert":

New Internal Activity Alert: Alert sent out to Agents when internal activity such as an internal note or an agent reply is appended to a ticket.This Alert is sent to all members enabled; Duplicate alerts are not sent out.

further down..

Internal Activity Alert for the Assigned Agent/Team is sent to the assigned agent or team if there is no response from another agent posted on the ticket or the alert for last respondent is not enabled.

Please note the "or".

As I understand it, this means that only the assigned agent receives an alert, except in cases where no agent is assigned but a team is. Then the team is alerted.

According to this pull request the description in the guide may have matched the code in earlier versions (1.7.x) before it was "fixed" -> https://github.com/osTicket/osTicket/pull/6601/commits/6ffd57108bfad27bb6156d519ce20769ab201656

At least in v1.18.1 the function onActivity works differently since "elseif ($team = $this->getTeam())" was changed to "if ($team = $this->getTeam())"

// Assigned staff / team
        if ($cfg->alertAssignedONTaskActivity()) {
            if (isset($vars['assignee'])
                    && $vars['assignee'] instanceof Staff)
                 $recipients[] = $vars['assignee'];
            elseif ($this->isOpen() && ($assignee = $this->getStaff()))
                $recipients[] = $assignee;

            if ($team = $this->getTeam())
                $recipients = array_merge($recipients, $team->getMembersForAlerts());
        }

Use case

Setup:

Configuration:

Scenario:

Variant A:

Expected behavior: Only Agent A is notified about the closed task

Actual behavior: Agent A and all members of "Servicedesk" are notified

Variant B:

Expected and actual behavior:

Suggested Solution(s)

Alternatives:

Maybe related to https://github.com/osTicket/osTicket/issues/6473 ?

...at first I was a bit surprised that a ticket can be assigned to a team and an agent at the same time since the drop down in the "new ticket" form explicitly asks for an "agent or a team"

Versions

v 1.8.1

JediKev commented 9 months ago

@digidigital

The merged fix was correct; we simply need to update the documentation. Thanks for the notice.

Just to note, you can assign both an Agent and a Team to a single Ticket/Task. It’s been like that for a long time.

Cheers.

JediKev commented 1 month ago

@digidigital

This is now updated in the official public documentation. If you still see the old wording you may need to clear all cache/cookies/sessions and/or hard reload the browser.

Cheers.