Here is what I added to my config.pm file.
Anyway according to me it is useless to check my configuration, it is correct.
My Customer User table, which in reality is the Mysql view 'Persone', doesn't have
.
They are 'optional' so OTRS should work well, instead it wants them as it is clear from the error message on first post.
In the mean time I added those fields to the view with fixed values and now the customer list is filled correctly.
However I remark this is not the expected behavior. Have I to open a bug report somewhere ?
Feel free to update the title of the thread, it may be misleading, but I couldn't think anything better.
Code: Select all
# CustomerUser
# (customer user database backend and settings)
$Self->{CustomerUser} = {
Name => 'Database Backend',
Module => 'Kernel::System::CustomerUser::DB',
Params => {
Table => 'persone',
# 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 => 0,
},
# customer unique id
CustomerKey => 'CodiceFiscale',
# customer #
CustomerID => 'ID_persona',
#CustomerValid => 'valid_id',
# The last field must always be the email address so that a valid
# email address like "John Doe" <john.doe@domain.com> can be constructed from the fields.
CustomerUserListFields => [ 'Nome', 'Cognome', 'email' ],
# CustomerUserListFields => ['login', 'first_name', 'last_name', 'customer_id', 'email'],
CustomerUserSearchFields => [ 'CodiceFiscale', 'Nome', 'Cognome', 'ID_persona' ],
CustomerUserSearchPrefix => '*',
CustomerUserSearchSuffix => '*',
CustomerUserSearchListLimit => 250,
CustomerUserPostMasterSearchFields => ['email'],
CustomerUserNameFields => [ 'Nome', 'Cognome' ],
CustomerUserEmailUniqCheck => 1,
# # show now own tickets in customer panel, CompanyTickets
# CustomerUserExcludePrimaryCustomerID => 0,
# # generate auto logins
# AutoLoginCreation => 0,
# # generate auto login prefix
# AutoLoginCreationPrefix => 'auto',
# # admin can change customer preferences
# AdminSetPreferences => 1,
# # use customer company support (reference to company, See CustomerCompany settings)
# CustomerCompanySupport => 1,
# AuthModule => 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, link class(es)
# [ 'UserTitle', 'Title', 'title', 1, 0, 'var', '', 0 ],
[ 'UserFirstname', 'Firstname', 'Nome', 1, 1, 'var', '', 0 ],
[ 'UserLastname', 'Lastname', 'Cognome', 1, 1, 'var', '', 0 ],
[ 'UserLogin', 'Username', 'CodiceFiscale', 1, 1, 'var', '', 0 ],
[ 'UserPassword', 'Password', 'ID_persona', 0, 0, 'var', '', 0 ],
[ 'UserEmail', 'Email', 'email', 1, 1, 'var', '', 0 ],
# [ 'UserEmail', 'Email', 'email', 1, 1, 'var', '$Env{"CGIHandle"}?Action=AgentTicketCompose;ResponseID=1;TicketID=$Data{"TicketID"};ArticleID=$Data{"ArticleID"}', 0, '', 'AsPopup OTRSPopup_TicketAction' ],
[ 'UserCustomerID', 'CustomerID', 'CodiceItav', 0, 1, 'var', '', 0 ],
# [ 'UserCustomerIDs', 'CustomerIDs', 'customer_ids', 1, 0, 'var', '', 0 ],
[ 'UserPhone', 'Phone', 'Telefono', 1, 0, 'var', '', 0 ],
# [ 'UserFax', 'Fax', 'fax', 1, 0, 'var', '', 0 ],
[ 'UserMobile', 'Mobile', 'Cellulare', 1, 0, 'var', '', 0 ],
[ 'UserStreet', 'Street', 'Via_Piazza', 1, 0, 'var', '', 0 ],
[ 'UserZip', 'Zip', 'Cap', 1, 0, 'var', '', 0 ],
[ 'UserCity', 'City', 'Localita', 1, 0, 'var', '', 0 ],
# [ 'UserCountry', 'Country', 'country', 1, 0, 'var', '', 0 ],
[ 'UserComment', 'Comment', 'Note', 1, 0, 'var', '', 0 ],
# [ 'ValidID', 'Valid', 'valid_id', 0, 1, 'int', '', 0 ],
],
# default selections
Selections => {
# UserTitle => {
# 'Mr.' => 'Mr.',
# 'Mrs.' => 'Mrs.',
# },
},
};