In "Agent" interface:
There was a problem that I had to deal with - the "Follow Up" notifications were sent to the owner of a ticket only.
We wanted it to be sent to everybody who chooses to receive follow-up notifications for a specific queue in his "Preferences".
This patch does that - it allows every agent to receive an update.
I have also patched OTRS to send notifications with a "From" being a real queue e-mail address, not a generic one.
This allows replies to notifications end up in the right place.
Hopefully, it can be merged into the main source.
Have fun!
diff -urN otrs-orig/Kernel/System/Ticket/Article.pm otrs/Kernel/System/Ticket/Article.pm --- otrs-orig/Kernel/System/Ticket/Article.pm 2004-10-14 15:17:54.000000000 +0000 +++ otrs/Kernel/System/Ticket/Article.pm 2005-04-21 10:59:52.000000000 +0000 @@ -292,15 +292,24 @@ } } elsif ($Param{HistoryType} =~ /^FollowUp$/i || $Param{HistoryType} =~ /^AddNote$/i) { - # get owner - my ($OwnerID, $Owner) = $Self->OwnerCheck(TicketID => $Param{TicketID}); - if ($OwnerID ne $Self->{ConfigObject}->Get('PostmasterUserID') && $OwnerID ne $Param{UserID}) { - my %Preferences = $Self->{UserObject}->GetUserData(UserID => $OwnerID); - if ($Preferences{UserSendFollowUpNotification}) { - # send notification + +# +# Changed by Yaroslav Klyukin +# Sends notification to everybody who chooses to receive Follow-Ups in his preferences, not only if he is the owner. +# 04/21/05 +# + + foreach ($Self->GetSubscribedUserIDsByQueueID(QueueID => $Ticket{QueueID})) { + my %UserData = $Self->{UserObject}->GetUserData( + UserID => $_, + Cached => 1, + Valid => 1, + ); + if ($UserData{UserSendFollowUpNotification}) { + $Self->SendAgentNotification( Type => $Param{HistoryType}, - UserData => \%Preferences, + UserData => \%UserData, CustomerMessageParams => \%Param, TicketID => $Param{TicketID}, Queue => $Param{Queue}, @@ -1751,9 +1760,16 @@ $Notification{Subject} =~ s{<OTRS_CONFIG_(.+?)>}{$Self->{ConfigObject}->Get($1)}egx; # send notify + +# +# Changed by Yaroslav Klyukin +# Make notifications originate from the Queue E-mail address, not from a generic one. +# 04/21/05 +# + my %Address = $Self->{QueueObject}->GetSystemAddress(QueueID => $Article{QueueID}); + $Self->{SendmailObject}->Send( - From => $Self->{ConfigObject}->Get('NotificationSenderName'). - ' <'.$Self->{ConfigObject}->Get('NotificationSenderEmail').'>', + From => "$Address{RealName} <$Address{Email}>", To => $User{UserEmail}, Subject => $Notification{Subject}, Type => 'text/plain', @@ -1773,7 +1789,7 @@ # log event $Self->{LogObject}->Log( Priority => 'notice', - Message => "Sent agent '$Param{Type}' notification to '$User{UserEmail}'.", + Message => "Sent agent '$Param{Type}' notification from '<$Address{Email}>' to '$User{UserEmail}'.", ); return 1;
_______________________________________________ OTRS mailing list: otrs - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/otrs To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs Support oder Consulting für Ihr OTRS System? => http://www.otrs.de/