Email autocomplete not working properly

Moderator: crythias

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

Email autocomplete not working properly

Post by qqsrnec » 24 Jul 2018, 15:01

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
Moderator
Posts: 14386
Joined: 26 Jan 2007, 14:50
OTRS Version?: Git Master
Contact:

Re: Email autocomplete not working properly

Post by jojo » 24 Jul 2018, 15:06

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

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com :: Share your ideas

qqsrnec
OTRS newbie
Posts: 8
Joined: 24 Jul 2018, 14:02
OTRS Version?: 5.0.23

Re: Email autocomplete not working properly

Post by qqsrnec » 26 Jul 2018, 13:02

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
OTRS guru
Posts: 2527
Joined: 08 Jul 2010, 22:25
OTRS Version?: 6.0.x

Re: Email autocomplete not working properly

Post by wurzel » 26 Jul 2018, 13:39

Hi,

delete the cache... maybe you have cached values

Florian
    ((OTRS)) Community Edition 6.0.x, LAMP LIVE auf Debian 9
    OTRS 6 Managed Silver

    -- 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
    OTRS newbie
    Posts: 8
    Joined: 24 Jul 2018, 14:02
    OTRS Version?: 5.0.23

    Re: Email autocomplete not working properly

    Post by qqsrnec » 26 Jul 2018, 13:59

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

    Tom

    jojo
    Moderator
    Posts: 14386
    Joined: 26 Jan 2007, 14:50
    OTRS Version?: Git Master
    Contact:

    Re: Email autocomplete not working properly

    Post by jojo » 26 Jul 2018, 17:14

    did you try to delete

    Code: Select all

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

    Never change Defaults.pm! :: Blog
    Professional Services:: http://www.otrs.com :: enjoy@otrs.com :: Share your ideas

    qqsrnec
    OTRS newbie
    Posts: 8
    Joined: 24 Jul 2018, 14:02
    OTRS Version?: 5.0.23

    Re: Email autocomplete not working properly

    Post by qqsrnec » 30 Jul 2018, 08:26

    I changed it to:

    Code: Select all

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

    Tom

    jojo
    Moderator
    Posts: 14386
    Joined: 26 Jan 2007, 14:50
    OTRS Version?: Git Master
    Contact:

    Re: Email autocomplete not working properly

    Post by jojo » 30 Jul 2018, 08:29

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

    Never change Defaults.pm! :: Blog
    Professional Services:: http://www.otrs.com :: enjoy@otrs.com :: Share your ideas

    qqsrnec
    OTRS newbie
    Posts: 8
    Joined: 24 Jul 2018, 14:02
    OTRS Version?: 5.0.23

    Re: Email autocomplete not working properly

    Post by qqsrnec » 02 Aug 2018, 10:51

    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
    Moderator
    Posts: 14386
    Joined: 26 Jan 2007, 14:50
    OTRS Version?: Git Master
    Contact:

    Re: Email autocomplete not working properly

    Post by jojo » 02 Aug 2018, 10:58

    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™ 6, STORM powered by OTRS
    "Testing": ((OTRS Community Edition)) git Master

    Never change Defaults.pm! :: Blog
    Professional Services:: http://www.otrs.com :: enjoy@otrs.com :: Share your ideas

    qqsrnec
    OTRS newbie
    Posts: 8
    Joined: 24 Jul 2018, 14:02
    OTRS Version?: 5.0.23

    Re: Email autocomplete not working properly

    Post by qqsrnec » 02 Aug 2018, 15:00

    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
    Moderator
    Posts: 14386
    Joined: 26 Jan 2007, 14:50
    OTRS Version?: Git Master
    Contact:

    Re: Email autocomplete not working properly

    Post by jojo » 02 Aug 2018, 15:11

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

    Never change Defaults.pm! :: Blog
    Professional Services:: http://www.otrs.com :: enjoy@otrs.com :: Share your ideas

    Post Reply