Martin, What is the expected release date of 2.0?
Bernie Frye Director, Technical Sales Engineering CURRENT Technologies, LLC 12800 Middlebrook Road, Suite 201 Germantown, Md. 20874 301-515-7617 ext. 214 240-793-9137 cell ***CONFIDENTIALITY NOTICE*** The information in this email may be confidential and/or privileged. This email is intended to be reviewed by only the individual or organization named above. If you are not the intended recipient or an authorized representative of the intended recipient, you are hereby notified that any review, dissemination or copying of this email and its attachments, if any, or the information contained herein is prohibited. If you have received this email in error, please immediately notify the sender by return email and delete this message from your system. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Martin Edenhofer Sent: Wednesday, February 16, 2005 1:49 AM To: Development community of OTRS Subject: Re: [dev] Suggested addition Hi John, OTRS 2.0 comes with the <OTRS_CUSTOMER_*> option. That means every customer map tag can be used. This means you can use <OTRS_CUSTOMER_UserFirstname>. This should solve your problem. -Martin John (Versimedia) wrote: > I would like to suggest the following code addition to the module: > > AgentCompose.pm inserted at line 264... > > > it is a new variable for responses called: > > <OTRS_CUSTOMER_REALFIRSTNAME> > > Background, we found that we wanted to have pre-set responses but to > make them sound as nice as possible we want to say: > > Hi <firstname>, > > The _REALNAME variable unfortunately shows a non-pretty format... This > new variable works the following way: > > Joe Smith < [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > converts to " Joe" > Smith, Joe < [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > converts to " Joe" > Joe < [EMAIL PROTECTED] > converts to " Joe" > Mr. Joe Smith < [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > converts to " > Joe " (I have to actually double check this one) > < [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > converts to "" > > Notice that all results except empty string have a " " (space) in front > of them -- this is on purpose so that if you say: > > Hi<..._REALFIRSTNAME>, > > You won't wind up with a space between the "Hi" and "," if the result is > nothing... but if there is a result, the space is inserted. This way > the result looks exactly like it should in all cases. > > It is working great so far and has saved us tons of work cleaning up > responses based on what peoples email address is. Might need some > tweaks over time as new emails come in but seems to do well right now. > > -John > > > > --------------------------------------------- > Insert at line 264: > > if ($Data{Salutation} =~ /<OTRS_CUSTOMER_REALFIRSTNAME>/) { > # get realname > my $From = ''; > if ($Ticket{CustomerUserID}) { > $From = $Self->{CustomerUserObject}->CustomerName(UserLogin > => $Ticket{CustomerUserID}); > } > if (!$From) { > $From = $Data{OrigFrom} || ''; > $From =~ s/<.*>|\(.*\)|\"|;//g; > > $From =~ s#^.*?,##; > $From =~ s# +$##; $From =~ s#^ +##; > $From =~ s# +# #g; > > foreach (split (' ',$From)) > { if ($_ !~ m#\.#) { $From = $_; last; } } > > if ($From =~ [EMAIL PROTECTED]) { $From = ""; } > > if ($From ne "") { $From = " $From"; } > } > $Data{Salutation} =~ s/<OTRS_CUSTOMER_REALFIRSTNAME>/$From/g; > } > > > ------------------------------------------------------------------------ _______________________________________________ OTRS mailing list: dev - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/dev To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/dev _______________________________________________ OTRS mailing list: dev - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/dev To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/dev
