DynamicFieldFromCustomerUser bug or I'm missing something

Moderator: crythias

Locked
andrei
Znuny newbie
Posts: 15
Joined: 30 Jan 2013, 11:26
Znuny Version: OTRS::ITSM 3.2.1
Real Name: Andrei Miron
Company: Euroanswer

DynamicFieldFromCustomerUser bug or I'm missing something

Post by andrei »

Hi,

I just installed the last OTRS Community version:
rpm -q otrs
otrs-6.0.16-01.noarch

on a new CentOS box:
cat /etc/redhat-release
CentOS Linux release 7.6.1810 (Core)

I'm trying to map the phone of the customer to the ticket in order to be able to search the tickets by the phone number. So after carefully reading the documentation and tutorials I think I did the necessary configurations. Meaning:
- i added a dynamic field called CustomerPhone to the ticket
- I added this dynamic field in Ticket::Frontend::AgentTicketFreeText###DynamicField and the agent can see (and edit) this field
- I activated the module: Ticket::EventModulePost###4100-DynamicFieldFromCustomerUser (you can see in the "DynamicFieldFromCustomerUser web screenshot" attached)
- I did the mapping in DynamicFieldFromCustomerUser::Mapping (also can be seen in the screenshot attached) and I deleted the example mapping between CustomerFirstname and UserFirstname (you can see it in the "DynamicFieldFromCustomerUser web screenshot")

Now everytime I fetch an email and transform it in a ticket I can see an error in SystemLog related to the default mapping (which is deleted from SysConfig) - can be seen in the attached file "SystemLog screenshot". Also the CustomerUser field Pone (the number which is in this field) is not copied in the ticket dynamic field CustomerPhone.
On the disk in the file Kernel/Config/Files/XML/Ticket.xml the default mapping still exist (can be seen in the attached file "Ticket_xml screenshot").

Now my questions is: it is a bug and my configuration was not saved hence the content of the customer field si not copied in the dynamic field of the ticket. Also the error that the mapping does not exist between CustomerFirstname and "UserFirstname". Or I did something wrong in the configuration?

Thanks,
Andrei
You do not have the required permissions to view the files attached to this post.
root
Administrator
Posts: 4250
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: DynamicFieldFromCustomerUser bug or I'm missing something

Post by root »

Hi,

You miss something. The key needs to be a valid name from your CustomerUser configuration mapping. I suggest it's UserPhone instead of Phone.

- Roy
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 ?
andrei
Znuny newbie
Posts: 15
Joined: 30 Jan 2013, 11:26
Znuny Version: OTRS::ITSM 3.2.1
Real Name: Andrei Miron
Company: Euroanswer

Re: DynamicFieldFromCustomerUser bug or I'm missing something

Post by andrei »

Hi Roy,

Thanks for you suggestion. I change it accordingly and it is still not working.
It is still complaining that CustomerFirstname it is not defined:
DynamicField CustomerFirstname in DynamicFieldFromCustomerUser::Mapping must be set in system and valid.
What is strange to me is that I deleted this mapping from the beggining.

Do you have any ideas how I can pinpoint the problem?

Thanks,
Andrei
andrei
Znuny newbie
Posts: 15
Joined: 30 Jan 2013, 11:26
Znuny Version: OTRS::ITSM 3.2.1
Real Name: Andrei Miron
Company: Euroanswer

Re: DynamicFieldFromCustomerUser bug or I'm missing something

Post by andrei »

Hi,

I found the bug. It seems that from the SysConfig it is not saving this mapping.
I modified the file: Kernel/Config/Files/ZZZAAuto.pm (where I found the default mapping) with my mapping and everything works as expected.

Unfortunately this workaround (to modify the file ZZZAAuto.pm by editing) it is not a solution. This file is modified everytime a change in configuation is done. And everytime in the mapping is reverted to the default one.

So is definitely a bug. Now I have to find it.
andrei
Znuny newbie
Posts: 15
Joined: 30 Jan 2013, 11:26
Znuny Version: OTRS::ITSM 3.2.1
Real Name: Andrei Miron
Company: Euroanswer

Re: DynamicFieldFromCustomerUser bug or I'm missing something

Post by andrei »

For anyone else who is affected by this bug putting the configuration in Config.pm will solve it.
The configuration from Config.pm is taking precedence and it will not be affected by the bug from the web interface.

Best regards,
Andrei
root
Administrator
Posts: 4250
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: DynamicFieldFromCustomerUser bug or I'm missing something

Post by root »

Hi,

I'm pretty conviced that this is not a bug and is related to your system. I use this feature in dozens of setups without having a problem.
Did you increased LogLevel (SysConfig) to Debug?

- Roy
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 ?
andrei
Znuny newbie
Posts: 15
Joined: 30 Jan 2013, 11:26
Znuny Version: OTRS::ITSM 3.2.1
Real Name: Andrei Miron
Company: Euroanswer

Re: DynamicFieldFromCustomerUser bug or I'm missing something

Post by andrei »

Hi,

Yes I increased the LogLEvel to debug and the message (related to this field mapping) is the same. Nothing related to what I defined in the mapping just an error that the default DynamicField CustomerFirstName is not defined in the system. Which is correct because I didn't defined it but it is not in the mapping so it should not exist in the system.

I don't know what else I can show in order to proof that it is a bug. I attached screenshots with all I did and explain what it is wrong and how can be reproduced.
Locked