Email autocomplete not working properly

Moderator: crythias

Post Reply
qqsrnec
Znuny newbie
Posts: 8
Joined: 24 Jul 2018, 14:02
Znuny Version: 5.0.23

Email autocomplete not working properly

Post by qqsrnec »

Hi,
I am using LDAP AuthModule for agent authentication for some time, with no problems. Now, I wanted to enable email autofilling while replaying or writing new ticket (we do not work with Customers). My curent configuration is working halfway, after typing few letters, I got list with correct names, I choose one I want, but only his name, not email adress is putted into grey "To" form.

Could you please help me?

Config.pm

Code: Select all

...
# customer unique id
    CustomerKey => 'uid',
    # customer #
    CustomerID => 'uisID',
    CustomerUserListFields => ['cn;lang-utf8'],
    CustomerUserSearchFields => ['uid', 'cn'],
    CustomerUserSearchPrefix => '*',
    CustomerUserSearchSuffix => '*',
    CustomerUserSearchListLimit => 250,
    CustomerUserPostMasterSearchFields => ['mail'],
    CustomerUserNameFields => ['givenname', 'sn'],
    # show not own tickets in customer panel, CompanyTickets
    CustomerUserExcludePrimaryCustomerID => 0,
    # add an ldap filter for valid users (expert setting)
#    CustomerUserValidFilter => '(!(description=locked))',
    # administrator can't change customer preferences
    AdminSetPreferences => 0,
#    # cache time to live in sec. - cache any database queries
#    CacheTTL => 0,
    Map => [
        # note: Login, Email and CustomerID are mandatory!
        # var, frontend, storage, shown (1=always,2=lite), required, storage-type, http-link, readonly
        [ 'UserTitle',      'Title',      'cn',           1, 0, 'var', '', 0 ],
        [ 'UserFirstname',  'Firstname',  'givenname',       1, 1, 'var', '', 0 ],
        [ 'UserLastname',   'Lastname',   'sn',              1, 1, 'var', '', 0 ],
        [ 'UserLogin',      'Username',   'uid',             1, 1, 'var', '', 0 ],
        [ 'UserEmail',      'Email',      'mail',            1, 1, 'var', '', 0 ],
        [ 'UserCustomerID', 'CustomerID', 'uisID',           0, 1, 'var', '', 0 ],
#        [ 'UserCustomerIDs', 'CustomerIDs', 'second_customer_ids', 1, 0, 'var', '', 0 ],
        [ 'UserPhone',      'Phone',      'telephonenumber', 1, 0, 'var', '', 0 ],
	[ 'UserAddress',    'Address',    'postaladdress',   1, 0, 'var', '', 0 ],
        [ 'UserComment',    'Comment',    'employeeType',     1, 0, 'var', '', 0 ],
    ],
};
...
Thanks and BR
Tom
jojo
Znuny guru
Posts: 15019
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Email autocomplete not working properly

Post by jojo »

CustomerUserListFields hast to contain (as last value) the mail address field
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
qqsrnec
Znuny newbie
Posts: 8
Joined: 24 Jul 2018, 14:02
Znuny Version: 5.0.23

Re: Email autocomplete not working properly

Post by qqsrnec »

Unfortunately, it did not help. I change settings accordingly:

Code: Select all

    CustomerUserListFields => ['cn;lang-utf8', 'mail'],
and still get only name, not email address.

Image
wurzel
Znuny guru
Posts: 3224
Joined: 08 Jul 2010, 22:25
Znuny Version: x.x.x
Real Name: Florian

Re: Email autocomplete not working properly

Post by wurzel »

Hi,

delete the cache... maybe you have cached values

Florian
OTRS 8 SILVER (Prod)
OTRS 8 auf Debian 11 (Test)
Znuny 7.x latest version testing auf Debian 11

-- Ich beantworte keine Forums-Fragen PN - No PN please

I won't answer to unfriendly users any more. A greeting and regards are just polite.
qqsrnec
Znuny newbie
Posts: 8
Joined: 24 Jul 2018, 14:02
Znuny Version: 5.0.23

Re: Email autocomplete not working properly

Post by qqsrnec »

Hi Florian,
I deleted cashed values and also tried another browser, but still getting names and not email.

Tom
jojo
Znuny guru
Posts: 15019
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Email autocomplete not working properly

Post by jojo »

did you try to delete

Code: Select all

;lang-utf8
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
qqsrnec
Znuny newbie
Posts: 8
Joined: 24 Jul 2018, 14:02
Znuny Version: 5.0.23

Re: Email autocomplete not working properly

Post by qqsrnec »

I changed it to:

Code: Select all

CustomerUserListFields => ['cn', 'mail'],
and outcome is still the same.

Tom
jojo
Znuny guru
Posts: 15019
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Email autocomplete not working properly

Post by jojo »

then check your LDAP if mail is the correct value and it is filled with mail addresses
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
qqsrnec
Znuny newbie
Posts: 8
Joined: 24 Jul 2018, 14:02
Znuny Version: 5.0.23

Re: Email autocomplete not working properly

Post by qqsrnec »

Our LDAP is used for many servers and working correctly. Also authetification is working as it should.

I got another idea. Is it possible to add suffix like "@mydomain.com"? I am able to change settings so that "To" form is filled with username and after adding this suffix, I will get valid email adress.
jojo
Znuny guru
Posts: 15019
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Email autocomplete not working properly

Post by jojo »

please check again if the field mail is filled with a valid email address. you should be able to get a ldif from the the user and verify the field names and the content.
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
qqsrnec
Znuny newbie
Posts: 8
Joined: 24 Jul 2018, 14:02
Znuny Version: 5.0.23

Re: Email autocomplete not working properly

Post by qqsrnec »

I did ldapsearch against our LDAP from OTRS server with email parameter for one of the OTRS agent and it worked as expected. I got mail addresses (we use more than one).
jojo
Znuny guru
Posts: 15019
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Email autocomplete not working properly

Post by jojo »

so the field email contains more than value or is it used several times per user (as this will not work)
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
Post Reply