Thanks for sharing your experience with the list, Keith. Much appreciated.
fields... a feature that I'm having a tough time understanding
not to me). That's a clarification question I'll have to submit to the
list after a bit more exploration.
Post by Keith TurnerI've been wanting to add additional information to the customers...
Hi, we) - after much striving - finally figured it out. I'll post a version of
this to otrs mail as well. Comments welcome.
First add your fields to the database using whatever DB utility you want.
Then you have to add the fields to the customer map. To do this look for the
CustomerUser object in the default.pm config file, and copy it to the config.pm
file (leave the default.pm alone and make all your config changes in the
config.pm file - the config file is read after the default one, so it
overwrites any values in the prior)
Inside the CustomerUser object is a map object that starts "Map => [" which has
an array of arrays for each customer user field.
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, 1, 'var', '', 0 ],
[ 'UserEmail', 'Email', 'email', 0, 1, 'var', '', 0 ],
[ 'UserCustomerID', 'CustomerID', 'customer_id', 0, 1, 'var', '', 0 ],
[ 'UserComment', 'Comment', 'comments', 1, 0, 'var', '', 0 ],
[ 'ValidID', 'Valid', 'valid_id', 0, 1, 'int', '', 0 ],
# Added by Cloud Systems.
[ 'CustomerCompany', 'Company', 'company', 1, 1, 'var', '', 0 ],
[ 'CustomerTelephone', 'Telephone', 'telephone', 1, 1, 'int', '', 0 ],
],
We then added Company and Telephone fields to the creation of a customer
account and also put in some front end JavaScript validation to make some
fields required as well before a submit - as this currently required a server
call. Be sure to add your new fields to the end of the list, as some internal
function calls seem to use magic numbers to get the right elements so order
here is important.
To make the added fields show up in the customer information area of the pages
we wanted, we simply needed to change the "shown" parameter as listed into the
top comment a 1 instead of a 0.
Hope this helps. Feel free to ask more questions if this isn't clear, though
I'm still fighting with a lot of this myself. We also looked at using the
freetext fields, but to us they looked like they were too tied into the
freekeys and all their unwanted associated functionality.
We'd looked at this for a long time, and no answers to this simple question
despite multiple posts to both mail lists.
Ah, well - learned a lot.
Keith
_______________________________________________
OTRS mailing list: otrs - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/otrs
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs
Support oder Consulting für Ihr OTRS System?
=http://www.otrs.de/