Agent notification modifications

Moderator: crythias

Locked
Linwood
Znuny newbie
Posts: 55
Joined: 10 Feb 2015, 15:30
Znuny Version: 4.0.6
Real Name: Linwood Ferguson
Company: LE Ferguson, LLC

Agent notification modifications

Post by Linwood »

My basic issue is a client request to change agent notifications to work differently.

I think my only option is to turn them off and use event notifications, but before heading in that direction would appreciate confirmation if my understanding is correct.

What I THINK that Agent Notifications do:

- Occur on a series of events (under "Agent Notifications" in Admin) that cannot be changed, though the text of email can for each.

- Are sent to agents as below, but
> Only if they turn them on in preferences, AND
> ONLY if the ticket queue is selected in My Queues

- The agents to receive are:
> Sent to the Agent that has the ticket locked, if it is locked, OR
> Sent to all Agents with R/W access to the queue of the ticket.

- Except if self notification is set to default (disabled), no notification is sent for actions the agent initiates.

First question: Is that synopsis correct?

The clients request is to send notifications ONLY to the agent assigned and ONLY when an agent is assigned to a ticket, not on creation. They should never be sent to other agents (e.g. that have R/W access to the queue). Since in most cases initial assignment will not lock the ticket, the out of the box behavior is sending notifications to all agents for that queue, which is not desired.

Yes, I agree this is not ideal as it allows tickets to become stagnant, created but not assigned, but it's what they want (for now).

Is there a straightforward way to do that?

The direction I think I need to take is turn off regular notifications, and use event notifications for this instead. Which removes the ability to manage receipt by agent preferences of course, but that may be OK.

Am I missing anything? Would it be easier to change the code that sends these (I spent a few minutes looking for it without luck so far, pointer welcomed).
Linwood Ferguson
OTRS 4.0 patch 6, ubuntu 14.04 on HyperV, MySql
Linwood
Znuny newbie
Posts: 55
Joined: 10 Feb 2015, 15:30
Znuny Version: 4.0.6
Real Name: Linwood Ferguson
Company: LE Ferguson, LLC

Re: Agent notification modifications

Post by Linwood »

Well, I apparently did not have the synopsis correct. It looks to me from a bit of experimentation and a bit of code reading that while there are 5 circumstances for agent notifications (not event notifications) that are controlled by user preferences:

New ticket
Watched
Lock Timeout
Move
Followup

There also appear these:

OwnerUpdate
AddNote
Escalation
EscalationNotifyBefore
PendingReminder
ResponsibleUpdate
ServiceUpdate

I tracked down cases of OwnerUpdate and it appears, at least in my limited reading, there is no general way to turn that off (other than in code or turning off all notifications with SendNoNotifications).

So I think if I want to change the way ticket assignment works, I need to change the user preferences to remove the New Ticket, and handle it entirely in Notification (Events), let the OwnerUpdate handle assignments for not-new tickets, and if I want to do additional notification for OwnerUpdate (I think they want a manager told also) then do that separately in Notification (Events).

Does that sound right?
Linwood Ferguson
OTRS 4.0 patch 6, ubuntu 14.04 on HyperV, MySql
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Agent notification modifications

Post by crythias »

There are some notifications (reminders) that cannot be turned off, such as Add note notification to owner if the owner isn't the one that added the note.
Linwood wrote:- The agents to receive are:
> Sent to the Agent that has the ticket locked, if it is locked, OR
> Sent to all Agents with R/W access to the queue of the ticket.
Also Watchers (I believe) and Responsibles if the ticket is locked. Also assigned notification.
Linwood wrote:First question: Is that synopsis correct?
No. Notifications yes, and queues highlighted in "My Queues". Except for the non-negotiable notifications like Add Note, and that is to the Owner/Watcher/Responsible of the ticket.
Linwood wrote:The clients request is to send notifications ONLY to the agent assigned and ONLY when an agent is assigned to a ticket, not on creation.
Linwood wrote:They should never be sent to other agents (e.g. that have R/W access to the queue).
Shouldn't anyway as long as the queue isn't highlighted in Agent Preferences "My Queues".
Linwood wrote:Since in most cases initial assignment will not lock the ticket
On ticket creation, yes it should. That is, it doesn't tell everyone that you've assigned the ticket to Bob. Again, they won't get new ticket notification if Agent Preferences No and/or Queue not highlighted in My Queues.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Agent notification modifications

Post by crythias »

OwnerUpdate is the "This ticket has been assigned to you." It's not negotiable.

New ticket (Agent Preferences Yes, Queue highlighted in My Queues)
Watched (You're assigned as a Watcher of a ticket, Agent Preferences Yes)
Lock Timeout (Agent Preferences Yes)
Move (Agent Preferences Yes)
Followup (Agent Preferences Yes)

There also appear these:

OwnerUpdate (Can't turn off. You've been assigned as Owner.)
AddNote (Can't turn off. Someone added a note to your ticket.)
Escalation (Can't turn off. It doesn't matter. SLA has been breached.)
EscalationNotifyBefore (Can't turn off. SLA is soon to be breached.)
PendingReminder (Can't turn off, but you asked for it.)
ResponsibleUpdate (Can't turn off. You've been assigned as Responsible.)
ServiceUpdate (??) I'm not really sure.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Linwood
Znuny newbie
Posts: 55
Joined: 10 Feb 2015, 15:30
Znuny Version: 4.0.6
Real Name: Linwood Ferguson
Company: LE Ferguson, LLC

Re: Agent notification modifications

Post by Linwood »

Thanks. Is there a general statement also about who gets the notifications?

And when the My Queues (and Services but I really do not care about those) are involved and not?

It may seem that I'm over thinking this, but every time I think I know what the rules are, someone asks a question or brings me a counter example and I start over again, so I'm trying to build a spreadsheet of the combinations and what it does.

Might this be useful to others if we can fill it in?

Are there some general rules that could help fill it in? For example, for a locked ticket, does the notificaiton always ONLY go to the owner (and/or responsible, and watching)? Without regard to My Queues?

And for a non-locked ticket, does the notification always go to the My Queues (+ R/W access) group, with some but not all also requiring the preference switch? Or do the ones without the preference switch like escalation go to all with R/W access without looking at My Queues?

There's just too many combinations, and a lack of clear definition anywhere I can find, to get my arms around, so I am starting to test each scenario. If you happen to know some clear rules that would fill these in it would be helpful.

And if you think others might benefit from it when filled in I will pass it back on.
You do not have the required permissions to view the files attached to this post.
Linwood Ferguson
OTRS 4.0 patch 6, ubuntu 14.04 on HyperV, MySql
root
Administrator
Posts: 4253
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Agent notification modifications

Post by root »

This charts looks awesome, maybe you can made it accessible via Google Docs or create a page here http://wiki.otterhub.org/index.php?titl ... s_Overview
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
Linwood
Znuny newbie
Posts: 55
Joined: 10 Feb 2015, 15:30
Znuny Version: 4.0.6
Real Name: Linwood Ferguson
Company: LE Ferguson, LLC

Re: Agent notification modifications

Post by Linwood »

root wrote:This charts looks awesome, maybe you can made it accessible via Google Docs or create a page here http://wiki.otterhub.org/index.php?titl ... s_Overview
Thanks, I appreciate the encouragement, I just need to work through the combinations.

As mentioned, pointers to known answers (to save testing) welcomed.

And am I missing variables not considered, i.e. other control points?
Linwood Ferguson
OTRS 4.0 patch 6, ubuntu 14.04 on HyperV, MySql
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Agent notification modifications

Post by crythias »

OwnerUpdate is the "This ticket has been assigned to you." It's not negotiable.

New ticket (Agent Preferences Yes, Queue highlighted in My Queues) (All who have this set and My Queues)
Watched (You're assigned as a Watcher of a ticket, Agent Preferences Yes) (All who have this set and My Q)
Lock Timeout (Agent Preferences Yes) (All who have this set and My Q)
Move (Agent Preferences Yes) (All who have this set and My Q)
Followup (Agent Preferences Yes) (All who have this set and My Q)

There also appear these:

OwnerUpdate (Can't turn off. You've been assigned as Owner.) Only the target set as owner
AddNote (Can't turn off. Someone added a note to your ticket.) Owner, Watcher, Responsible
Escalation (Can't turn off. It doesn't matter. SLA has been breached.)
EscalationNotifyBefore (Can't turn off. SLA is soon to be breached.)
PendingReminder (Can't turn off, but you asked for it.) (notification handling is in bin/otrs.PendingJobs.pl. Owner if locked, all "My Queues" and Owner and responsible)
ResponsibleUpdate (Can't turn off. You've been assigned as Responsible.) (responsible)
[/quote]

You'll see a lot of GetSubscribedUserIDsByQueueID which is the effective result of

Code: Select all

SELECT user_id FROM personal_queues WHERE queue_id = ?
Which is essentially Agent Preferences MyQueues.


Again, locked = Owner and Responsible and possibly Watcher.
unlocked = My Queues and Owner, Responsible.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Agent notification modifications

Post by crythias »

I don't have any indication of R/W = Queue notification. Unless you can demonstrate otherwise, it's My Queues.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Linwood
Znuny newbie
Posts: 55
Joined: 10 Feb 2015, 15:30
Znuny Version: 4.0.6
Real Name: Linwood Ferguson
Company: LE Ferguson, LLC

Re: Agent notification modifications

Post by Linwood »

crythias wrote:I don't have any indication of R/W = Queue notification. Unless you can demonstrate otherwise, it's My Queues.
You are probably correct since I gather you've looked at the code. I was going by postings in various places. I did not keep track, here is one however:

http://blog.otrs.org/2011/07/06/otrs-ti ... fications/

Notice it says "(1) The agent must have group permissions to view the queue". I know I read others that said write permission as well, though can't find it.

Now indirectly (at least at a point in time) you can't have a queue in my queues that you don't have permissions for, but I think it is useful to know that the system is checking (only) My Queues and not some access control as well. Thank you.

PS. I was side tracked yesterday but going back to testing these, and thanks for the extra hints. Some have been a surprise, at least in an initial test for example I was surprised (and disappointed) that the Escalation Warning (not Escalation itself) appears to go to all the My Queues users, and not just to the owner of a locked ticket. It seems so much more... friendly to be able to give the owner a warning first. In fact in the test I ran the owner did NOT get the warning at all (nor the escalation notice) unless the owner also had it in My Queues, really a problem if someone might occasionally work a ticket in a different queue than he normally watches.
Linwood Ferguson
OTRS 4.0 patch 6, ubuntu 14.04 on HyperV, MySql
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Agent notification modifications

Post by crythias »

Linwood wrote:(1) The agent must have group permissions to view the queue
This is more of a prerequisite for a Queue to show up in My Queues (as a selectable preference option, not that it's automatically highlighted) than it is directly whether notifications get to the Agent.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Linwood
Znuny newbie
Posts: 55
Joined: 10 Feb 2015, 15:30
Znuny Version: 4.0.6
Real Name: Linwood Ferguson
Company: LE Ferguson, LLC

Re: Agent notification modifications

Post by Linwood »

crythias wrote:
Linwood wrote:(1) The agent must have group permissions to view the queue
This is more of a prerequisite for a Queue to show up in My Queues (as a selectable preference option, not that it's automatically highlighted) than it is directly whether notifications get to the Agent.
Understood. I was just collecting data from dozens of postings and mail list archives to try to understand this.

And we all know that everything you read on the internet is true.

That's why I am trying to test these. I appreciate the pointers to keep me honest.
Linwood Ferguson
OTRS 4.0 patch 6, ubuntu 14.04 on HyperV, MySql
Linwood
Znuny newbie
Posts: 55
Joined: 10 Feb 2015, 15:30
Znuny Version: 4.0.6
Real Name: Linwood Ferguson
Company: LE Ferguson, LLC

Re: Agent notification modifications

Post by Linwood »

crythias wrote: Again, locked = Owner and Responsible and possibly Watcher.
unlocked = My Queues and Owner, Responsible.
I keep doing testing, partly for education.

The one that is surprising to me, and seems inconsistent with the above, is when I tested both escalations and escalation warnings, they seemed to only and always go to the My Queues list, and NOT to the owner. I did the test with a locked ticket where the owner had My Queues, and a locked ticket where the owner did not have My Queues set. In both cases the warning and final notice went to the My Queues list only.

Is that what you would have expected?

I think I'll go back and redo the test, but this is the only one that I found surprising, well, at least after I found the control point for reminders.

Is it possible for escalation I'm missing a control setting?
You do not have the required permissions to view the files attached to this post.
Linwood Ferguson
OTRS 4.0 patch 6, ubuntu 14.04 on HyperV, MySql
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Agent notification modifications

Post by crythias »

https://github.com/OTRS/otrs/blob/rel-4 ... nt.pm.dist
https://github.com/OTRS/otrs/blob/rel-4 ... omQueue.pm
(no owner, just My Queues)

Code: Select all

    my @UserIDs = $TicketObject->GetSubscribedUserIDsByQueueID(
        QueueID => $Ticket{QueueID},
    );
https://github.com/OTRS/otrs/blob/rel-4 ... m.examples
https://github.com/OTRS/otrs/blob/rel-4 ... mission.pm

Code: Select all

    my @UserIDs = $Kernel::OM->Get('Kernel::System::Group')->GroupMemberList(
        GroupID => $Queue{GroupID},
        Type    => 'rw',
        Result  => 'ID',
    );
The above is the only rw combination that I *know* about and it's only *if* the .examples is used. GA is the thing that handles escalation notifications.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Locked