[otrs-cvs] otrs/Kernel/System/Ticket/Event NotificationEvent.pm, 1.37.2.1, 1.37.2.2
"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-serv27780/Kernel/System/Ticket/Event
Modified Files:
Tag: rel-3_1
NotificationEvent.pm
Log Message:
Fixed bug#8974 - Event Based Notification does not populate REALNAME with Customer User data.
Author: mb
Index: NotificationEvent.pm
===================================================================
RCS file: /home/cvs/otrs/Kernel/System/Ticket/Event/NotificationEvent.pm,v
retrieving revision 1.37.2.1
retrieving revision 1.37.2.2
diff -2 -u -d -r1.37.2.1 -r1.37.2.2
--- NotificationEvent.pm 1 Aug 2012 22:39:22 -0000 1.37.2.1
+++ NotificationEvent.pm 10 Dec 2012 15:07:40 -0000 1.37.2.2
@@ -521,9 +521,4 @@
}
- # prepare customer realname
- if ( $Notification{Body} =~ /<OTRS_CUSTOMER_REALNAME>/ && $Recipient{Realname} ) {
- $Notification{Body} =~ s/<OTRS_CUSTOMER_REALNAME>/$Recipient{Realname}/g;
- }
-
# replace config options
$Notification{Body} =~ s{<OTRS_CONFIG_(.+?)>}{$Self->{ConfigObject}->Get($1)}egx;
@@ -543,4 +538,13 @@
DynamicFields => 1,
);
+
+ # prepare customer realname
+ if ( $Notification{Body} =~ /<OTRS_CUSTOMER_REALNAME>/ ) {
+ my $RealName = $Self->{CustomerUserObject}->CustomerName(
+ UserLogin => $Ticket{CustomerUserID}
+ ) || $Recipient{Realname};
+ $Notification{Body} =~ s/<OTRS_CUSTOMER_REALNAME>/$RealName/g;
+ }
+
for my $Key ( keys %Ticket ) {
next if !defined $Ticket{$Key};
---------------------------------------------------------------------
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