First open a terminal and cd to your otrs install directory.
cd /usr/share/otrs
Enable CustomerCompanySupport
sudo vim Kernel/Config.pmAdd the following line inside the sub Load method.
# Enable Customer Company linking. $Self->{CustomerUser}->{CustomerCompanySupport} = 1;
Run the mysql client and add a field to the customer table.
mysql -u root -p use otrs2; alter table customer_user add column company_id varchar(100); exit
Register the extra row with the editor.
sudo vim Kernel/Config/Defaults.pmFind the CustomerUser variable and then the Map array within it. Add the following line after the UserCustomerID field.
[ 'UserCompanyID', 'CompanyID', 'company_id', 0, 1, 'var', '', 0 ],
Change the company dropdown list to trigger on the new CompanyID field.
sudo vim Kernel/Modules/AdminCustomerUser.pmLook for the reference to UserCustomerID and change it to UseCompanyID. It should look like this now.
$Entry->[0] =~ /^UserCompanyID$/i
Change the dispaly logic to match against the new CompanyID.
sudo vim Kernel/System/CustomerUser.pmLook for the reference to UserCustomerID and change it to UseCompanyID. It should look like this now.
CustomerID => $Customer{UserCompanyID},
You can now restart apache and the changes should show up.
sudo /etc/init.d/apache2 restart