NewTicket writes CustomerUser->Login but Frontend expects CustomerUser->CustomerKey?!!?

Moderator: crythias

Locked
Sascha79
Znuny newbie
Posts: 38
Joined: 23 Jul 2009, 09:21
Znuny Version: 5.0.22 (GIT)
Real Name: Sascha

NewTicket writes CustomerUser->Login but Frontend expects CustomerUser->CustomerKey?!!?

Post by Sascha79 »

Hi,

I've been searching for hours why OTRS does write the wrong CustomerUser-Data into the ticket (using external backend).
Config was:

CustomerKey => 'PersonID',
[ 'UserLogin', 'Username', 'Login' ]

Using this settings, NO customer user ever was shown in the Agent-GUI.
With help of doctor google and this forum, I found a little piece of code in NewTicket.pm:

Code: Select all

# take CustomerID from customer backend lookup or from from field
if ( $CustomerData{UserLogin} && !$GetParam{'X-OTRS-CustomerUser'} ) {
  $GetParam{'X-OTRS-CustomerUser'} = $CustomerData{UserLogin};
It uses the value of UserLogin as identifier for the CustomerUser.
That forces everybody to use UserLogin for CustomerKey - or no CustomerUser will be shown in the GUI.
(nice to see that the documentaion silently does it exactly that way - no hint that the values have to be identic)

So for me (and possibly other users), check if your external customeruser-backend is configured like that:

CustomerKey => 'Login',
[ 'UserLogin', 'Username', 'Login' ]

Maybe it helps somebody else.
"Production": OTRS5 (Ubuntu 16.04.4 Server (LTS) / Apache2 / MySQL 5+
Locked