[Solved] Using more than one customer backend with OTRS

Moderator: crythias

Locked
dtosun
Znuny newbie
Posts: 24
Joined: 12 Sep 2012, 14:00
Znuny Version: 4.0.13
Real Name: Dursun Tosun

[Solved] Using more than one customer backend with OTRS

Post by dtosun »

Hi,

I want to get more customer info when i create ticket. I decide to use more than one customer backend. I did everything in documents at the below.
http://otrs.github.io/doc/manual/admin/ ... kends.html

Everythings are working well except turkish character problem. When i check customer info in ticket, turkish chars are not shown correctly. Anybody help me?
My source database encoding is utf-8
My destination charset must be ISO-8859-9 to shown correctly.

My code is;

Code: Select all

# 1. Customer user backend: DB
# (customer database backend and settings)
$Self->{CustomerUser} = {
    Name => 'MySU Rehber',
    Module => 'Kernel::System::CustomerUser::DB',
    Params => {
        # if you want to use an external database, add the
        # required settings
#       DSN => 'DBI:odbc:yourdsn',
        Type => 'postgresql', # only for ODBC connections
        DSN => 'DBI:Pg:dbname=xxxxx;host=xxxxxxxxxx',
        User => 'xxxxxxxxx',
        Password => 'xxxxxxxxx',
        Table => 'xxxxxxxxxxxxxxx',
    },
    # customer unique id
    CustomerKey => 'username',
    # customer #
    CustomerID => 'email',
#   CustomerValid => 'valid_id',
    CustomerUserListFields => ['first_name', 'last_name', 'email'],
    CustomerUserSearchFields => ['username','first_name', 'last_name', 'email'],
    CustomerUserSearchPrefix => '',
    CustomerUserSearchSuffix => '*',
    CustomerUserSearchListLimit => 25,
    CustomerUserPostMasterSearchFields => ['email'],
    CustomerUserNameFields => ['first_name','middle_name','last_name'],
    CustomerUserEmailUniqCheck => 1,
    SourceCharset => 'utf-8',
    DestCharset   => 'ISO-8859-9',
	CharsetConvertForce => 1,
#	CaseSensitive => 1,
#    # 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 => 0,
#    # 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',        		0, 0, 'var', '', 0 ],
        [ 'UserFirstname',  	'Firstname',  	'first_name',   		1, 1, 'var', '', 0 ],
        [ 'UserLastname',   	'Lastname',   	'last_name',    		1, 1, 'var', '', 0 ],
        [ 'UserLogin',      	'Username',   	'username',     		1, 0, 'var', '', 0 ],
 #      [ 'UserPassword',   	'Password',   	'pw',           		0, 0, 'var', '', 0 ],
        [ 'UserEmail',      	'Email',      	'email',        		0, 1, 'var', '', 0 ],
        [ 'UserCustomerID', 	'CustomerID', 	'email',        		0, 1, 'var', '', 0 ],
        [ 'UserPhone',      	'Phone Number'	,'int_phone',   		1, 0, 'var', '', 0 ],
 #      [ 'UserFax',        	'Fax',        	'fax',          		0, 0, 'var', '', 0 ],
 #      [ 'UserMobile',     	'Mobile',     	'mobile',       		0, 0, 'var', '', 0 ],
        [ 'UserCity',       	'Building',     'bldg_shortdesc_tr',    1, 0, 'var', '', 0 ],
        [ 'UserStreet',     	'Room Number',	'room_no',      		1, 0, 'var', '', 0 ],
 #      [ 'UserZip',        	'Zip',        	'zip',          		0, 0, 'var', '', 0 ],
        [ 'UserCountry',    	'Unit',    		'unit_shortdesc_tr',   	1, 0, 'var', '', 0 ],
        [ 'UserComment',    	'Profile',    	'profile_name_tr',     	1, 0, 'var', '', 0 ],
 #      [ 'ValidID',        	'Valid',      	'valid_id',     		0, 1, 'int', '', 0 ],
    ],
    # default selections
    Selections => {
        UserTitle => {
            'Mr.' => 'Mr.',
            'Mrs.' => 'Mrs.',
        },
    },
};
Last edited by dtosun on 29 May 2014, 07:45, edited 1 time in total.
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Using more than one customer backend with OTRS

Post by crythias »

The code you posted seems to indicate it should work. Except it's only for one backend.

There's not a lot to go on to assist you.
dtosun wrote:My source database encoding is utf-8
My destination charset must be ISO-8859-9 to shown correctly.
Either this statement is valid or
dtosun wrote: turkish chars are not shown correctly.
this statement is invalid
or
you're not showing the backend code for the other backend.
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
dtosun
Znuny newbie
Posts: 24
Joined: 12 Sep 2012, 14:00
Znuny Version: 4.0.13
Real Name: Dursun Tosun

Re: Using more than one customer backend with OTRS

Post by dtosun »

I decide to use only one backend, but my problem is Turkish characters are not shown correctly:(

These two parameters does not effect my data?
SourceCharset => 'utf-8',
DestCharset => 'ISO-8859-9',

Any advice you have?
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Using more than one customer backend with OTRS

Post by jojo »

set DestCharset to utf-8 as OTRS (at least > 3.1 is 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
dtosun
Znuny newbie
Posts: 24
Joined: 12 Sep 2012, 14:00
Znuny Version: 4.0.13
Real Name: Dursun Tosun

Re: Using more than one customer backend with OTRS

Post by dtosun »

I did it like this DestCharset => 'utf-8', but there is no change?
I think this parameter does not effect my code?
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Using more than one customer backend with OTRS

Post by crythias »

Please don't PM me with questions. I regret I'm not able to assist you with alternate character sets. I assumed that utf-8 everywhere (including the coalition of the database) should work.
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
dtosun
Znuny newbie
Posts: 24
Joined: 12 Sep 2012, 14:00
Znuny Version: 4.0.13
Real Name: Dursun Tosun

Re: [Solved] Using more than one customer backend with OTRS

Post by dtosun »

These parameters should be in params function.
SourceCharset => 'utf-8',
DestCharset => 'utf-8',
Locked