Merge LDAP fields into Customer ID?

Moderator: crythias

Locked
Mothra
Znuny expert
Posts: 189
Joined: 26 Oct 2010, 15:04
Znuny Version: 3.2.11

Merge LDAP fields into Customer ID?

Post by Mothra »

Is it possible, via Config.pm, to merge more than one field into the CustomerID?

This is for the Customer Interface in which the ability to view all tickets for the Company is inappropriate for large companies, or those where the various departments only want to see tickets raised by their immediate colleagues.

As our internal customers are added via Active Directory, I was wondering whether it's possible to merge both the "company" and "department" fields into the Customer ID, so that it would contain "Acme Ltd - Sales", "Acme Ltd - IT Support" etc.?

If not, I can just get our AD guy to add the department names to the company field in AD, but I would prefer that be a last resort.
OTRS 3.2.11 on Centos 6.4 with MySQL 5.0. Agents and internal customers authenticate via Active Directory.
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Merge LDAP fields into Customer ID?

Post by crythias »

You might be able to do it with concatenation in Map.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Mothra
Znuny expert
Posts: 189
Joined: 26 Oct 2010, 15:04
Znuny Version: 3.2.11

Re: Merge LDAP fields into Customer ID?

Post by Mothra »

crythias wrote:You might be able to do it with concatenation in Map.
Of course! I've been treating it for so long as just a config file, I sometimes forget that it's also a Perl Module. :)
OTRS 3.2.11 on Centos 6.4 with MySQL 5.0. Agents and internal customers authenticate via Active Directory.
mweisser
Znuny newbie
Posts: 1
Joined: 01 Jun 2011, 20:07
Znuny Version: 3

Re: Merge LDAP fields into Customer ID?

Post by mweisser »

Can you post how you configured your Mapping in Detail?
I've got the same problem and didn't get it working with perl concatenation. This would be very helpful :)
ndhvu275
Znuny advanced
Posts: 139
Joined: 06 Nov 2012, 09:02
Znuny Version: 3.x, 4.x and 5.x
Real Name: Vu Nguyen
Company: INFOdation
Location: Netherlands
Contact:

Re: Merge LDAP fields into Customer ID?

Post by ndhvu275 »

crythias wrote:You might be able to do it with concatenation in Map.
Hi can you explain for more detail, or writedown to how merge manyfields into only one field is CustomerID

Thanks in adv

Hoang Vu
OTRS 3.x, 4.x on CentOS/Windows
MySQL database
External customer backend with MySQL, MSSQL
Customization
ndhvu275
Znuny advanced
Posts: 139
Joined: 06 Nov 2012, 09:02
Znuny Version: 3.x, 4.x and 5.x
Real Name: Vu Nguyen
Company: INFOdation
Location: Netherlands
Contact:

Re: Merge LDAP fields into Customer ID?

Post by ndhvu275 »

Hi

You can merge many fields into a CustomerID field in your file config like below

[ 'UserCustomerID', 'CustomerID', 'CONCAT_WS("",postcode, house_nr, house_ext_nr, room)', 0, 1, 'var', '', 0 ],

And don't forget enable property ReadyOnly => 1. Do not allow to add/update on your external customer DB, just view.

Hope it's helpful for someone

Vu Nguyen
OTRS 3.x, 4.x on CentOS/Windows
MySQL database
External customer backend with MySQL, MSSQL
Customization
Locked