Show dynamic fields on company for multiple user databases

Moderator: crythias

Post Reply
finalbeta
Znuny newbie
Posts: 11
Joined: 12 Jul 2018, 12:19
Znuny Version: 5.1.1.1.1

Show dynamic fields on company for multiple user databases

Post by finalbeta »

Hi everyone,

I'm on OTRS6 and I'm having trouble adding some dynamic fields to the AgentTicketZoom screen. I end up breaking things. ( it might be because my initial links are faulty to start with. )

I'm using the internal CustomerCompany database.
I'm using the internal CustomerUser database.
I'm using LDAP to allow agents to log on, I'm also using LDAP to log on customers.
I'm syncing my agents as customers too so I can log tickets on my agents.
My LDAP users have a field for all users "company" that has the integer value for the Customer ID (company) in the internal OTRS database.
Agents are able to log on fine, so are customers, rights are ok.

I'm now trying to add some dynamic field on the Customer to the AgentTicketZoom screen.
I know this should be done by mapping them. But the moment I try this, I break the system. The problem might be because I'm using LDAP & internal CustomerUsers.

I'm hoping to get some help with that mapping. Here is the config part I'm playing with at the moment.
The moment I add it, I break all links between tickets and Customer Companies.
I'm not sure how to make the map work for everything, (internal users/ldap users etc).

Code: Select all

    
    ####################################################
    ############# CHANGE MAPPING FOR DYNAMIC FIELDS ####
    ####################################################
    #$Self->{CustomerCompany}->{Map} = [
    #  [ 'CustomerID',             'CustomerID', 'customer_id', 0, 1, 'var', '', 0 ],
    #  [ 'CustomerCompanyName',    'Customer',   'name',        1, 1, 'var', '', 0 ],
    #  [ 'CustomerCompanyStreet',  'Street',     'street',      1, 0, 'var', '', 0 ],
    #  [ 'CustomerCompanyZIP',     'Zip',        'zip',         1, 0, 'var', '', 0 ],
    #  [ 'CustomerCompanyCity',    'City',       'city',        1, 0, 'var', '', 0 ],
    #  [ 'CustomerCompanyCountry', 'Country',    'country',     1, 0, 'var', '', 0 ],
    #  [ 'CustomerCompanyURL',     'URL',        'url',         1, 0, 'var', '[% Data.CustomerCompanyURL | html %]', 0 ],
    #  [ 'CustomerCompanyComment', 'Comment',    'comments',    1, 0, 'var', '', 0 ],
    #  [ 'DynamicField_customerDefaultTicketManager', undef, 'customerDefaultTicketManager', 1, 1, 'dynamic_field', undef, 0 ],
    #  [ 'DynamicField_afterHoursSupport', undef, 'afterHoursSupport', 1, 1, 'dynamic_field', undef, 0 ],   
    #  [ 'ValidID',                'Valid',      'valid_id',    0, 1, 'int', '', 0 ],
    #];
If it helps, I can post the entire config (I know this is a complicated question)
Post Reply