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
5 comments:
Hi, I've tried your customization but I still can't see the difference. Maybe I just can't find the difference. I'm still have no link between CustomerUser and CustomerCompany. Can u explain what this customization do?
Specificly what his changes is: on my fresh instLl of orts there was no field on the users table to indicate witch company the user belongs to. These changes add a new field to track this assoscian and adds he field to the edit screen. It does not however add the logic to generate reports or do searches by this new field.
Jeremy, do you now is it possible to add drop down list in Customer User edit interface where you can choose Customer Company created in the Customer Company edit interface?
this was fixed in otrs3?
In Otrs3 you can use the 'CustomerID' field to track the company/department. When set it will let users with the same CustomerID see each others requests search and report by CustomerID
Post a Comment