I'm in the middle of testing OTRS and I came across a problem which I can't seem to solve myself, since I don't really understand what is going wrong.
Here are some facts first:
My problem:OS version: CentOS release 6.5 (Final) (x86_64)
OTRS version: 3.3.6
Installed packages: ITSM Bundle 3.3.6, FAQ 2.3.2, OTRS iPhoneHandle 1.3.1, CustomerCompanyImportExport 1.4.0, CustomerUserImportExport 1.10.0
I'm trying to add a phone field to "customer company", but for whatever reason, it doesn't appear on my frontend when I either open up an existing customer company or try to add a new customer company.
As described in http://otrs.github.io/doc/manual/admin/ ... er-backend I added a column to the customer_company table this way:
Right after that, I edited /Kernel/Config.pm this way:# mysql -p
mysql> use ptrs;
mysql> ALTER TABLE customer_company ADD phone VARCHAR (250);
mysql> quit
Code: Select all
# ---------------------------------------------------- #
# insert your own config settings "here" #
# config settings taken from Kernel/Config/Defaults.pm #
# ---------------------------------------------------- #
# $Self->{SessionUseCookie} = 0;
# $Self->{CheckMXRecord} = 0;
# ---------------------------------------------------- #
# CustomerCompany configuration
# ---------------------------------------------------- #
$Self->{CustomerCompany} = {
Name => 'Database Backend',
Module => 'Kernel::System::CustomerCompany::DB',
Params => {
# if you want to use an external database, add the
# required settings
# DSN => 'DBI:odbc:yourdsn',
# Type => 'mssql', # only for ODBC connections
# DSN => 'DBI:mysql:database=customerdb;host=customerdbhost',
# User => '',
# Password => '',
Table => 'customer_company',
# ForeignDB => 0, # set this to 1 if your table does not have create_time, create_by, change_time and change_by fields
# 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 => 0,
},
# company unique id
CustomerCompanyKey => 'customer_id',
CustomerCompanyValid => 'valid_id',
CustomerCompanyListFields => [ 'customer_id', 'name' ],
CustomerCompanySearchFields => ['customer_id', 'name'],
CustomerCompanySearchPrefix => '',
CustomerCompanySearchSuffix => '*',
CustomerCompanySearchListLimit => 250,
CacheTTL => 60 * 60 * 24, # use 0 to turn off cache
Map => [
# var, frontend, storage, shown (1=always,2=lite), required, storage-type, http-link, readonly
[ 'CustomerID', 'CustomerID', 'customer_id', 0, 1, 'var', '', 0 ],
[ 'CustomerCompanyName', 'Customer', 'name', 1, 1, 'var', '', 0 ],
[ 'CustomerCompanyPhone', 'TEL', 'phone', 1, 0, 'var', '', 0 ],
[ 'CustomerCompanyStreet', 'Street', 'street', 1, 0, 'var', '', 0 ],
[ 'CustomerCompanyZIP', 'Zip', 'zip', 1, 0, 'var', '', 0 ],
[ 'CustomerCompanyCity', 'City', 'city', 1, 0, 'var', '', 0 ],
[ 'CustomerCompanyCountry', 'Country', 'country', 1, 0, 'var', '', 0 ],
[ 'CustomerCompanyURL', 'URL', 'url', 1, 0, 'var', '$Data{"CustomerCompanyURL"}', 0 ],
[ 'CustomerCompanyComment', 'Comment', 'comments', 1, 0, 'var', '', 0 ],
[ 'ValidID', 'Valid', 'valid_id', 0, 1, 'int', '', 0 ],
],
};
# ---------------------------------------------------- #
# data inserted by installer #
# ---------------------------------------------------- #
# $DIBI$
# ---------------------------------------------------- #
# ---------------------------------------------------- #
# #
# end of your own config options!!! #
# #
# ---------------------------------------------------- #
# ---------------------------------------------------- #
Code: Select all
[ 'CustomerCompanyPhone', 'TEL', 'phone', 1, 0, 'var', '', 0 ],
Thank you very much!