OTRS - Adding new columns to customer database

Finding proper documentation on OTRS has been difficult for me so far. Maybe the reason behind this is, OTRS supports tons of great features, and to document everything that can be done is difficult. Nonetheless, OTRS is a fantastic software.

Recently, our company needed to add some columns in the OTRS backend database. As I work in a company that deals with the Internet, we needed to integrate customer bandwidth and prefix information to OTRS database. After some stumbling and trial and error, here's what can be done -

Part 1: Creating the columns


mysql -p
mysql> use otrs;
mysql> ALTER TABLE customer_user ADD bandwidth VARCHAR (50);
mysql> ALTER TABLE customer_user ADD prefix VARCHAR (250);
mysql> quit;

Part 2: Tuning OTRS

vim /opt/otrs/Kernel/Config/Defaults.pm

## And we add the following lines
[ 'UserBandwidth',    'Bandwidth',   'bandwidth',    1, 0, 'var', '', 0 ],
[ 'UserPrefix',       'Prefix',      'prefix',       1, 0, 'var', '', 0 ],


service otrs restart

And we are ready. The customer panel in OTRS should contain separate fields for bandwidth and prefixes now.

Hope this helps.

Comments

  1. Awesome, searched hours for this. love it!

    ReplyDelete
  2. Im sorry to necro an old thread, but this could help me alot.

    After adding the lines in config.pm the otrs service will not restart, i get the error that my database is not working or might not be configured, use the installer.pl

    Can you give any pointers on where in the config.pm file i should add those lines? Adding them at the bottom delivered the mentioned result...

    If this is too long ago and you can no longer help, thats no problem ofcourse!

    Thanks in advance,
    Matt

    ReplyDelete

Post a Comment