[otrs-cvs] otrs/Kernel/System/Ticket/Event NotificationEvent.pm, 1.46, 1.47

"CVS commits notifications of OTRS.org" <[email protected]>
Newsgroups gmane.comp.otrs.cvs
Message-ID <[email protected]>
Comments:
Update of /home/cvs/otrs/Kernel/System/Ticket/Event
In directory lancelot:/tmp/cvs-serv16844/Kernel/System/Ticket/Event

Modified Files:
	NotificationEvent.pm 
Log Message:
Fixed bug#9035 - Event Based mails, triggered by a process ticket, have no sender.

Author: cr

Index: NotificationEvent.pm
===================================================================
RCS file: /home/cvs/otrs/Kernel/System/Ticket/Event/NotificationEvent.pm,v
retrieving revision 1.46
retrieving revision 1.47
diff -2 -u -d -r1.46 -r1.47
--- NotificationEvent.pm	10 Dec 2012 15:09:06 -0000	1.46
+++ NotificationEvent.pm	14 Jan 2013 15:15:27 -0000	1.47
@@ -1,5 +1,5 @@
 # --
 # Kernel/System/Ticket/Event/NotificationEvent.pm - a event module to send notifications
-# Copyright (C) 2001-2012 OTRS AG, http://otrs.org/
+# Copyright (C) 2001-2013 OTRS AG, http://otrs.org/
 # --
 # $Id$
@@ -820,5 +820,14 @@
     }
     else {
-        my %Address = $Self->{QueueObject}->GetSystemAddress( QueueID => $Article{QueueID} );
+        my %Address;
+
+        # set "From" address from Article if exist, otherwise use ticket information, see bug# 9035
+        if ( IsHashRefWithData( \%Article ) ) {
+            %Address = $Self->{QueueObject}->GetSystemAddress( QueueID => $Article{QueueID} );
+        }
+        else {
+            %Address = $Self->{QueueObject}->GetSystemAddress( QueueID => $Ticket{QueueID} );
+        }
+
         my $ArticleType = $Recipient{NotificationArticleType} || 'email-notification-ext';
         my $ArticleID = $Self->{TicketObject}->ArticleSend(
---------------------------------------------------------------------
OTRS mailing list: cvs-log - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/cvs-log
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/cvs-log
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.