Kundenidentifikation

Hilfe zu Znuny Problemen aller Art
Locked
Johannes
Moderator
Posts: 436
Joined: 30 Jan 2008, 02:26
Znuny Version: All of them ^^
Real Name: Hannes
Company: Znuny|OTTERHUB

Kundenidentifikation

Post by Johannes »

Moin Gemeinde... ich bin mir gerade nicht sicher ob das hier hin passt... ich versuche es einfach.

Habe mein OTRS-Testsystem mal an eine externe MySql DB angebunden.. soweit geht auch alles... also er findet meine 2 eingerichteten Kunden und man kann Ihnen Tickets zuordnen. Die Nutzerdaten werden dann auch ordnungsgemäß angezeigt.

Mein Problem ist die automatische Zuordnung... ich habe den Nutzern jeweils Mail Adressen gegeben, nur wenn ich von diesen etwas an das OTRS schreibe wird diese Mail nicht der Kunden# zugeordnet.
Da die DB Anbindung ja funktioniert, kann es nur ein Config Problem sein... Denk ich mal so 8)

Jemand eine Idee?

Merci im voraus


Ist ein OTRS 2.2.5 auf einen Debian
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Kundenidentifikation

Post by jojo »

leider ist meine Glaskugel kaputt.....


-> wo ist die Config.pm?
"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
Johannes
Moderator
Posts: 436
Joined: 30 Jan 2008, 02:26
Znuny Version: All of them ^^
Real Name: Hannes
Company: Znuny|OTTERHUB

Kundenidentifikation

Post by Johannes »

ups... :) na war ja schon später...

so hier die config.pm

Code: Select all

BEGIN {
    if (-f '/etc/otrs/database.pm') {
      require '/etc/otrs/database.pm';
      if ($dbtype eq 'pgsql') {
          $dbport ||= '5432';
          our $dsn = "DBI:Pg:dbname";
      }
      else {
          $dbport ||= '3306';
          our $dsn = "DBI:mysql:database";
      }
    }
}

sub Load {
    my $Self = shift;
    # ---------------------------------------------------- #
    # ---------------------------------------------------- #
    #                                                      #
    #         Start of your own config options!!!          #
    #                                                      #
    # ---------------------------------------------------- #
    # ---------------------------------------------------- #

    # ---------------------------------------------------- #
    # database settings                                    #
    # ---------------------------------------------------- #
    # DatabaseHost
    # (The database host.)
    $Self->{'DatabaseHost'} = 'localhost';
    # Database
    # (The database name.)
    $Self->{'Database'} = 'otrs';
    # DatabaseUser
    # (The database user.)
    $Self->{'DatabaseUser'} = 'otrs';
    # DatabasePw
    # (The password of database user. You also can use bin/CryptPassword.pl
    # for crypted passwords.)
    $Self->{'DatabasePw'} = 'xxxxx';
    # DatabaseDSN
    # (The database DSN for MySQL ==> more: "man DBD::mysql")
    $Self->{DatabaseDSN} = "$dsn=$Self->{Database};host=$Self->{DatabaseHost};port=$dbport;";

    # (The database DSN for PostgreSQL ==> more: "man DBD::Pg")
    # if you want to use a local socket connection
    #    $Self->{DatabaseDSN} = "DBI:Pg:dbname=$Self->{Database};";
    # if you want to use a tcpip connection
    #    $Self->{DatabaseDSN} = "DBI:Pg:dbname=$Self->{Database};host=$Self->{DatabaseHost};";

    # ---------------------------------------------------- #
    # fs root directory
    # ---------------------------------------------------- #
    $Self->{Home} = '/usr/share/otrs';

    # ---------------------------------------------------- #
    # insert your own config settings "here"               #
    # config settings taken from Kernel/Config/Defaults.pm #
    # ---------------------------------------------------- #
    # $Self->{SessionUseCookie} = 0;
    # $Self->{'CheckMXRecord'} = 1;
    #$Self->{'Ticket::Frontend::CustomerInfoCompose'} = 1;
    #$Self->{'Ticket::Frontend::CustomerInfoZoom'} = 1;
    #$Self->{'Ticket::Frontend::CustomerInfoQueue'} = 0
    # CustomerUser
    # (customer user database backend and settings)
    $Self->{CustomerUser} = {
        Name => 'Database Backend MySQL',
        Module => 'Kernel::System::CustomerUser::DB',
        Params => {
    # if you want to use an external database, add the
    # required settings
    #            DSN => 'DBI:odbc:yourdsn',
            DSN => 'DBI:mysql:database=kunden;host=localhost',
            User => 'otrs',
            Password => 'xxxxxx',
            Table => 'kunden',
        },
    # customer uniq id
        CustomerKey => 'login',
    # customer #
        CustomerID => 'customer_id',
        CustomerValid => 'valid_id',
        CustomerUserListFields => ['first_name', 'last_name', 'email'],
    #        CustomerUserListFields => ['login', 'first_name', 'last_name', 'customer_id', 'email'],
        CustomerUserSearchFields => ['login', 'first_name', 'last_name', 'customer_id', 'email'],
        CustomerUserSearchPrefix => '',
        CustomerUserSearchSuffix => '*',
        CustomerUserSearchListLimit => 250,
        CustomerUserPostMasterSearchFields => ['email'],
        CustomerUserNameFields => ['salutation', 'first_name', 'last_name'],
        CustomerUserEmailUniqCheck => 0,
    #        # show now own tickets in customer panel, CompanyTickets
    #        CustomerUserExcludePrimaryCustomerID => 0,
             #generate auto logins
       AutoLoginCreation => 1,
    #        # generate auto login prefix
    #        AutoLoginCreationPrefix => 'auto',
    #        # admin can change customer preferences
       AdminSetPreferences => 1,
    #        # 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
            [ 'UserSalutation', 'Salutation', 'salutation',  1, 0, 'var', '', 0 ],
            [ 'UserFirstname',  'Firstname',  'first_name',  1, 1, 'var', '', 0 ],
            [ 'UserLastname',   'Lastname',   'last_name',   1, 1, 'var', '', 0 ],
            [ 'UserLogin',      'Username',   'login',       1, 1, 'var', '', 0 ],
            [ 'UserPassword',   'Password',   'pw',          0, 0, 'var', '', 0 ],
            [ 'UserEmail',      'Email',      'email',       0, 1, 'var', '', 0 ],
            [ 'UserEmail',      'Email', 'email',           1, 1, 'var', '$Env{"CGIHandle"}?Action=AgentTicketCompose&ResponseID=1&TicketID=$Data{"TicketID"}&ArticleID=$Data{"ArticleID"}', 0 ],
            [ 'UserCustomerID', 'CustomerID', 'customer_id', 0, 1, 'var', '', 0 ],
    #            [ 'UserCustomerIDs', 'CustomerIDs', 'customer_ids', 1, 0, 'var', '', 0 ],
            [ 'UserComment',     'Comment',   'comments',    1, 0, 'var', '', 0 ],
            [ 'ValidID',         'Valid',     'valid_id',    0, 1, 'int', '', 0 ],
        ],
    # default selections
        Selections => {
    #            UserSalutation => {
    #                'Mr.' => 'Mr.',
    #                'Mrs.' => 'Mrs.',
    #            },
        },
    };


    # ---------------------------------------------------- #
    # switch off the web based installer for the Debian package
    $Self->{'SecureMode'} = 1;

    # ---------------------------------------------------- #
    # data inserted by installer                           #
    # ---------------------------------------------------- #
    # $DIBI$
    $Self->{'SystemID'} = '01';
    $Self->{'Organization'} = 'LotB';
    $Self->{'LogModule::LogFile'} = '/tmp/otrs.log';
    $Self->{'LogModule'} = 'Kernel::System::Log::File';
    $Self->{'FQDN'} = '192.168.0.2';
    $Self->{'DefaultLanguage'} = 'de';
    $Self->{'DefaultCharset'} = 'iso-8859-1';
    $Self->{'AdminEmail'} = 'otrsadmin@lotb.de';

    # ---------------------------------------------------- #
    # ---------------------------------------------------- #
    #                                                      #
    #           End of your own config options!!!          #
    #                                                      #
    # ---------------------------------------------------- #
    # ---------------------------------------------------- #
}

# ---------------------------------------------------- #
# needed system stuff (don't edit this)                #
# ---------------------------------------------------- #
use strict;
use vars qw(@ISA $VERSION);
use Kernel::Config::Defaults;
push (@ISA, 'Kernel::Config::Defaults');
$VERSION = '$Revision: 1.18 $';
$VERSION =~ s/^\$.*:\W(.*)\W.+?$/$1/;
# -----------------------------------------------------#

1;

Danke im vorraus wie gesagt die DB Anbindung läuft
Locked