[Solved]Creating Tickets Not Searching for Customers Info

Moderator: crythias

Locked
mistat
Znuny newbie
Posts: 5
Joined: 01 Aug 2011, 03:49
Znuny Version: 3.0.9
Real Name: Mike Trewartha
Company: Adam Internet

[Solved]Creating Tickets Not Searching for Customers Info

Post by mistat »

Hello,
I've been asked to build a new install of OTRS for my organisation. We have a working install of OTRS 3.0.4 (I believe) which only authenticates customers and agents from a local database.

My install of OTRS authenticates Agents from Microsoft Active Directory, and it authenticates Customers from a MySQL Database.

One thing the developers who are using my OTRS install are complaining about is when creating a ticket (either email or phone) and typing in the "To" or "From Customer" it is not searching and populating the ticket with any customer information.

You can click on the "Customer" button, search for a customer via CustomerID or UserName, and it will fill out the customer detail. But the searching feature appears to do nothing.

Is this related to the Address Book in any way? How can you populate the AddressBook from Agents via Active Directory?
Last edited by mistat on 24 Aug 2011, 06:51, edited 1 time in total.
OTRS 3 on Linux with MySQL database backend for Customers, and connected to an Active Directory for Agents
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Creating Tickets Not Searching for Customers Info

Post by crythias »

mistat wrote:"To" or "From Customer" it is not searching and populating the ticket with any customer information.
Are you possibly using customer groups or have queues in groups for which the customers are not members?
mistat wrote:How can you populate the AddressBook from Agents via Active Directory?
Use multiple backends and add the agent active directory lookup. See the docs.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
mistat
Znuny newbie
Posts: 5
Joined: 01 Aug 2011, 03:49
Znuny Version: 3.0.9
Real Name: Mike Trewartha
Company: Adam Internet

Re: Creating Tickets Not Searching for Customers Info

Post by mistat »

crythias wrote:
mistat wrote:How can you populate the AddressBook from Agents via Active Directory?
Use multiple backends and add the agent active directory lookup. See the docs.
Hi crythias, I'm not quite sure what part of the documentation you are referring to. I've gone through the docs here: http://doc.otrs.org/3.0/en/html/external-backends.html and successfully have enabled Active Directory authentication for our staff as Agents (and can populate customers via MySQL too - but we'll tackle that issue next if possible)

Please see below my Config.pm for Active Directory Agent Authentication and advise if I have missed something.
crythias wrote:
mistat wrote:"To" or "From Customer" it is not searching and populating the ticket with any customer information.
Are you possibly using customer groups or have queues in groups for which the customers are not members?
This is a fresh install of OTRS (and ITSM). So no configuration has been done of groups at all. I will let the team who are working on the current development OTRS install configure that when they are happy with my base installation. Is this the reason that the search feature is not working?


Important parts of my Config.pm:

Code: Select all

    # Agent Auth from Active Directory
    $Self->{'AuthModule'} = 'Kernel::System::Auth::LDAP';
    $Self->{'AuthModule::LDAP::Host'} = 'xxx.yyy.com.au';
    $Self->{'AuthModule::LDAP::BaseDN'} = 'ou=Staff,dc=xxx,dc=yyy,dc=com,dc=au';
    $Self->{'AuthModule::LDAP::UID'} = 'sAMAccountName';

    # Check if the user is allowed to auth in a posixGroup
    # (e. g. user needs to be in a group OTRS to use otrs)
    $Self->{'AuthModule::LDAP::GroupDN'} = 'CN=OTRS,OU=Groups,DC=xxx,DC=yyy,DC=com,DC=au';
    $Self->{'AuthModule::LDAP::AccessAttr'} = 'member';
    $Self->{'AuthModule::LDAP::UserAttr'} = 'DN';

    # Bind credentials to log into AD
    $Self->{'AuthModule::LDAP::SearchUserDN'} = 'cn=zzz,ou=Internal,ou=Systems,dc=xxx,dc=yyy,dc=com,dc=au';
    $Self->{'AuthModule::LDAP::SearchUserPw'} = 'password';

    # in case you want to add always one filter to each ldap query, use
    # this option. e. g. AlwaysFilter => '(mail=*)' or AlwaysFilter => '(objectclass=user)'
    $Self->{'AuthModule::LDAP::AlwaysFilter'} = '';

    # in case you want to add a suffix to each login name, then
    # you can use this option. e. g. user just want to use user but
    # in your ldap directory exists user@domain.
    #$Self->{'AuthModule::LDAP::UserSuffix'} = '';

    # Net::LDAP new params (if needed - for more info see perldoc Net::LDAP)
    $Self->{'AuthModule::LDAP::Params'} = {
        port => 3268,
        timeout => 120,
        async => 0,
        version => 3,
    };

   # Now sync data with OTRS DB
    $Self->{'AuthSyncModule'} = 'Kernel::System::Auth::Sync::LDAP';
    $Self->{'AuthSyncModule::LDAP::Host'} = 'xxx.yyy.com.au';
    $Self->{'AuthSyncModule::LDAP::BaseDN'} = 'ou=Staff,dc=xxx,dc=yyy,dc=com,dc=au';
    $Self->{'AuthSyncModule::LDAP::UID'} = 'sAMAccountName';
    $Self->{'AuthSyncModule::LDAP::SearchUserDN'} = 'cn=zzz,ou=Internal,ou=Systems,dc=xxx,dc=yyy,dc=com,dc=au';
    $Self->{'AuthSyncModule::LDAP::SearchUserPw'} = 'password';

    $Self->{'AuthSyncModule::LDAP::UserSyncMap'} = {
        # DB -> LDAP
        UserFirstname => 'givenName',
        UserLastname  => 'sn',
        UserEmail     => 'mail',
    };

    # AuthSyncModule::LDAP::UserSyncInitialGroups
    # (sync following group with rw permission after initial create of first agent
    # login)
    $Self->{'AuthSyncModule::LDAP::UserSyncInitialGroups'} = [
        'users',
    ];


        # CustomerUser (customer database backend and settings)
        $Self->{CustomerUser} = {
                Name => 'Database Datasource',
                Module => 'Kernel::System::CustomerUser::DB',
                Params => {
                        # if you want to use an external database, add the required settings
                                DSN => 'DBI:mysql:database=xxx;host=yyy.dev.xxx.com.au',
                                User => 'aaa',
                                Password => 'password',
                                Table => 'otrsCustomers',
                                # if your frontend is unicode and the charset of your
                                # customer database server is iso-8859-1, use these options.
        #           SourceCharset => 'iso-8859-1',
        #           DestCharset => 'utf-8',

                                # CaseSensitive will control if the SQL statements need LOWER()
                                #   function calls to work case insensitively. Setting this to
                                #   1 will improve performance dramatically on large databases.
                                CaseSensitive => 1,
                        },
        # customer unique id
        CustomerKey => 'Login',

        # customer #
        CustomerID => 'CustomerID',
        CustomerValid => 'Active',
        CustomerUserListFields => ['FirstName', 'LastName', 'ContactEmail'],
        CustomerUserSearchFields => ['Login', 'CustomerID'],
        CustomerUserSearchPrefix => '',
        CustomerUserSearchSuffix => '',
        CustomerUserSearchListLimit => 10,
        CustomerUserPostMasterSearchFields => ['CustomerID'],
        CustomerUserNameFields => ['Title','FirstName','LastName'],
        CustomerUserEmailUniqCheck => 0,

        #    # show not own tickets in customer panel, CompanyTickets
        #    CustomerUserExcludePrimaryCustomerID => 0,
        #    # generate auto logins
        #    AutoLoginCreation => 0,
        #    AutoLoginCreationPrefix => 'auto',
        #    # admin can change customer preferences
        #    AdminSetPreferences => 1,
        #    # cache time to live in sec. - cache any database queries
                CacheTTL => 300,
        #    # just a read only source
                ReadOnly => 1,
                Map => [
                        # note: Login, Email and CustomerID needed!
                        # var, frontend, storage, shown (1=always,2=lite), required, storage-type, http-link, readonly, http-link-target
                        [ 'UserTitle',      'Title',         'Title',        1, 0, 'var', '', 0 ],
                        [ 'UserFirstname',  'First Name',    'FirstName',    1, 1, 'var', '', 0 ],
                        [ 'UserLastname',   'Last Name',     'LastName',     1, 1, 'var', '', 0 ],
                        [ 'UserLogin',      'Username',      'Login',        1, 1, 'var', '', 0 ],
                        [ 'UserCustomerID', 'CustomerID',    'CustomerID',   1, 1, 'var', '', 0 ],
                        [ 'UserPhone',      'Phone',         'PhoneHome',    1, 0, 'var', '', 0 ],
                        [ 'UserFax',        'Fax',           'PhoneFax',     1, 0, 'var', '', 0 ],
                        [ 'UserMobile',     'Mobile',        'PhoneMobile',  1, 0, 'var', '', 0 ],
                        [ 'UserStreet',     'Street',        'StreetName',   1, 0, 'var', '', 0 ],
                        [ 'UserZip',        'PostCode',      'PostCode',     1, 0, 'var', '', 0 ],
                        [ 'UserCity',       'Suburb',        'Suburb',       1, 0, 'var', '', 0 ],
                        [ 'UserCountry',    'State',         'State',        1, 0, 'var', '', 0 ],
                        [ 'UserComment',    'AccountType',   'AccountType',  1, 0, 'var', '', 0 ],
                        [ 'ManagedService', 'Managed',       'Managed',      1, 0, 'var', '', 0 ],
                        [ 'UserEmail',      'Contact Email', 'ContactEmail', 1, 1, 'var', '', 0 ],
                ],
                # default selections
                Selections => {
                        UserTitle => {
                                'Mr.' => 'Mr.',
                                'Mrs.' => 'Mrs.',
                        },
                },
        }
OTRS 3 on Linux with MySQL database backend for Customers, and connected to an Active Directory for Agents
mistat
Znuny newbie
Posts: 5
Joined: 01 Aug 2011, 03:49
Znuny Version: 3.0.9
Real Name: Mike Trewartha
Company: Adam Internet

Re: Creating Tickets Not Searching for Customers Info

Post by mistat »

Is anyone able to assist please?
OTRS 3 on Linux with MySQL database backend for Customers, and connected to an Active Directory for Agents
mistat
Znuny newbie
Posts: 5
Joined: 01 Aug 2011, 03:49
Znuny Version: 3.0.9
Real Name: Mike Trewartha
Company: Adam Internet

Re: Creating Tickets Not Searching for Customers Info

Post by mistat »

bump - im still having the same issues. Surely I'm not the first person with these issues?
OTRS 3 on Linux with MySQL database backend for Customers, and connected to an Active Directory for Agents
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Creating Tickets Not Searching for Customers Info

Post by crythias »

Code: Select all

        CustomerUserSearchPrefix => '',
        CustomerUserSearchSuffix => '',
The following may or may not make a difference
In the Defaults.pm, the values are '*', not ''

Code: Select all

        CustomerUserPostMasterSearchFields => ['CustomerID'],
is supposed to be ['email'] (or in your case ContactEmail) because PostMaster doesn't know CustomerID from an email.
docs

Code: Select all

CustomerUserSearchFields => ['login', 'last_name', 'customer_id'],
Defaults.pm

Code: Select all

        CustomerUserSearchFields           => [ 'login', 'first_name', 'last_name', 'customer_id' ],
your code

Code: Select all

        CustomerUserSearchFields => ['Login', 'CustomerID'],
That's probably your biggest search issue. Even though I'm showing the lower case fields from docs, you should be using the CamelCase fields representing the value in the third column of the Map record.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
mistat
Znuny newbie
Posts: 5
Joined: 01 Aug 2011, 03:49
Znuny Version: 3.0.9
Real Name: Mike Trewartha
Company: Adam Internet

Re: Creating Tickets Not Searching for Customers Info

Post by mistat »

crythias wrote:

Code: Select all

        CustomerUserSearchPrefix => '',
        CustomerUserSearchSuffix => '',
The following may or may not make a difference
In the Defaults.pm, the values are '*', not ''
Thankyou crythias - everything seems to be running smoothly now. You were correct, it related to the above quote (for anyone else with this issue.)
OTRS 3 on Linux with MySQL database backend for Customers, and connected to an Active Directory for Agents
Locked