Storing CustomerUser data in dynamic fields

Moderator: crythias

Post Reply
xaviercmx
Znuny newbie
Posts: 32
Joined: 08 Feb 2011, 18:52
Znuny Version: OTRS 4

Storing CustomerUser data in dynamic fields

Post by xaviercmx »

Hi eveybody,

I have the User Address information in the Active Directory field department, I'd like to preserve for each New Phone Ticket created by the agent.

Here is a part from my Cutomer LDAP Attribute mapping from Config.pm

Code: Select all

           [ 'UserAddress',    'PostalAddress',    'department',   1, 0, 'var', '', 0 ],
I’ve created a Ticket DynamicField of type Text named "department" in Sysconfig which will hold the information.

I added the following lines in Config.pm

Code: Select all

$Self->{'Ticket::Frontend::AgentTicketFreeText'}->{'DynamicField'} =  {
   'department' => '1',
};
$Self->{'Ticket::Frontend::AgentTicketZoom'}->{'DynamicField'} =  {
   'department' => '1',
};
$Self->{'Ticket::Frontend::CustomerTicketZoom'}->{'DynamicField'} =  {
   'department' => '1',
};
I’v enabled the module to store customer data in DynamicField

Code: Select all

$Self->{'Ticket::EventModulePost'}->{'930-DynamicFieldFromCustomerUser'} =  {
  'Event' => '(TicketCreate|TicketCustomerUpdate)',
  'Module' => 'Kernel::System::Ticket::Event::DynamicFieldFromCustomerUser'
};

and I've done the mapping in DynamicField

Code: Select all

$Self->{'DynamicFieldFromCustomerUser::Mapping'} =  {
  'UserAddress' => 'department'
};
I've tried changing Sysconfig and Config.pm, but it does not work, What did I do wrong?

Is there another way to get the department field from LDAP?

Can you help me?

Thanks.
wurzel
Znuny guru
Posts: 3234
Joined: 08 Jul 2010, 22:25
Znuny Version: x.x.x
Real Name: Florian

Re: Storing CustomerUser data in dynamic fields

Post by wurzel »

Hi,

it looks perfectly fine for me. Can you see something in the logs?

Florian
OTRS 8 SILVER (Prod)
OTRS 8 auf Debian 11 (Test)
Znuny 7.x latest version testing auf Debian 11

-- Ich beantworte keine Forums-Fragen PN - No PN please

I won't answer to unfriendly users any more. A greeting and regards are just polite.
xaviercmx
Znuny newbie
Posts: 32
Joined: 08 Feb 2011, 18:52
Znuny Version: OTRS 4

Re: Storing CustomerUser data in dynamic fields

Post by xaviercmx »

wurzel wrote:Hi,

it looks perfectly fine for me. Can you see something in the logs?

Florian
Hi Florian

I checked the log and found nothing related. Only this :(

...
info OTRS-otrs.Scheduler-0 Task is rescheduled (TaskID: 1).
notice OTRS-otrs.GenericAgent.pl-0 Run GenericAgent Job 'trigger escalation events' from config file.
notice OTRS-otrs.GenericAgent.pl-0 Run GenericAgent Job 'send escalation notifications' from config file.
...

Thanks
root
Administrator
Posts: 4011
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Storing CustomerUser data in dynamic fields

Post by root »

Does the LDAP department field of the customer you've tested with has a value?
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
wurzel
Znuny guru
Posts: 3234
Joined: 08 Jul 2010, 22:25
Znuny Version: x.x.x
Real Name: Florian

Re: Storing CustomerUser data in dynamic fields

Post by wurzel »

Hi,

and in the ticket history, there is nothing?

Flo
OTRS 8 SILVER (Prod)
OTRS 8 auf Debian 11 (Test)
Znuny 7.x latest version testing auf Debian 11

-- Ich beantworte keine Forums-Fragen PN - No PN please

I won't answer to unfriendly users any more. A greeting and regards are just polite.
xaviercmx
Znuny newbie
Posts: 32
Joined: 08 Feb 2011, 18:52
Znuny Version: OTRS 4

Re: Storing CustomerUser data in dynamic fields

Post by xaviercmx »

root wrote:Does the LDAP department field of the customer you've tested with has a value?

I reviewed ldap and I comment field "department" in ldap. I check cache, then the comment field does not appear. when I remove comment field shown in cache.
xaviercmx
Znuny newbie
Posts: 32
Joined: 08 Feb 2011, 18:52
Znuny Version: OTRS 4

Re: Storing CustomerUser data in dynamic fields

Post by xaviercmx »

wurzel wrote:Hi,

and in the ticket history, there is nothing?

Flo
Hi , I have reviewed the history ticket and I 've seen it catch the field value in a variable "OldValue" but "Value" is empty :?

Here is part of ticket history

Code: Select all

TicketDynamicFieldUpdate Update: FieldName=Depto;Value=Software;OldValue=;
TicketDynamicFieldUpdate Update: FieldName=Location;Value=
Principal;OldValue=;
TicketDynamicFieldUpdate Update: FieldName=Depto;Value=;OldValue=Software;
wurzel
Znuny guru
Posts: 3234
Joined: 08 Jul 2010, 22:25
Znuny Version: x.x.x
Real Name: Florian

Re: Storing CustomerUser data in dynamic fields

Post by wurzel »

Hi,

I can not follow your postings completely. Does it work now? Or does it not?
Does the LDAP field contain data?



From your last post:
TicketDynamicFieldUpdate Update: FieldName=Depto;Value=Software;OldValue=;
TicketDynamicFieldUpdate Update: FieldName=Location;Value=
Principal;OldValue=;
TicketDynamicFieldUpdate Update: FieldName=Depto;Value=;OldValue=Software;
it seems you write something in the field Depto
TicketDynamicFieldUpdate Update: FieldName=Depto;Value=Software;OldValue=

and in Location
TicketDynamicFieldUpdate Update: FieldName=Location;Value=
Principal;OldValue=;

and then you delete the first field again
TicketDynamicFieldUpdate Update: FieldName=Depto;Value=;OldValue=Software;[/quote]


So Depto is empty at the end.

Flo
OTRS 8 SILVER (Prod)
OTRS 8 auf Debian 11 (Test)
Znuny 7.x latest version testing auf Debian 11

-- Ich beantworte keine Forums-Fragen PN - No PN please

I won't answer to unfriendly users any more. A greeting and regards are just polite.
Post Reply