Hi Robert,

thanks for your fix. :) This will work fien for OTRS 1.2.

In OTRS 1.3 we also reworked this module and also improved the 
performance. If the first name from one source is found, the 
the name will be returned and no more lookups will be done:

[...]
    foreach ('', 1..10) {
        if ($Self->{"CustomerUser$_"}) {
            my $Name = $Self->{"CustomerUser$_"}->CustomerName(%Param);
            if ($Name) {
                return $Name;
            }
        }
    }
    return; 
[...]

Anyway, thanks for your good patch for OTRS 1.2! :-)

  Martin Edenhofer

--
((otrs.de)) :: OTRS GmbH :: Norsk-Data-Str. 1 :: 61352 Bad Homburg
        http://www.otrs.de/ :: Manage your communication! 

On Tue, Aug 03, 2004 at 07:17:54PM +0200, Robert Heinzmann wrote:
> attached you find a patch for Kernel/System/CustomerUser.pm 1.2.3. It is 
> a minor bug fix.
> 
> Problem: The customer username is not visible, because it is overwritten 
> if you have mutiple customer data sources.
> 
> Bye,
> 
> Robert Heinzmann

> --- otrs.orig/Kernel/System/CustomerUser.pm   2004-04-02 15:41:46.000000000 +0200
> +++ otrs/Kernel/System/CustomerUser.pm        2004-08-03 19:13:00.000000000 +0200
> @@ -106,7 +106,9 @@
>      my $Name = $Self->{CustomerUser}->CustomerName(%Param) || ''; 
>      foreach (1..10) {
>          if ($Self->{"CustomerUser$_"}) {
> -            $Name = $Self->{"CustomerUser$_"}->CustomerName(%Param);
> +         if (my $tempName=$Self->{"CustomerUser$_"}->CustomerName(%Param)) {
> +                 $Name = $tempName;
> +         }
>          }
>      }
>      return $Name;


_______________________________________________
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

Reply via email to