Dynamic Field wont show up in AgentTicketZoom

Moderator: crythias

Locked
Dietrich1337
Znuny newbie
Posts: 11
Joined: 10 May 2023, 13:06
Znuny Version: 7.0
Real Name: Marcel Carus

Dynamic Field wont show up in AgentTicketZoom

Post by Dietrich1337 »

Hey Guys,

i tried to add a dynamic field to the AgentTicketZoom in addition to the Ticket-Information. Unfortunatly, it wont show up. I added a field "Dynamic Fields" and set it to valid. After that, I assigned it to to AgentTicketZoom, OverviewMedium, OverviewPreview and OverviewSmall. I also check the Sysconfig at Ticket::Frontend::AgentTicketZoom###DynamicField and set my field to activate. But it wont show up in the Ticket-Information. Do I missed some improtant step?

Kind regards

Dietrich
skullz
Znuny superhero
Posts: 658
Joined: 24 Feb 2012, 03:58
Znuny Version: LTS and Features
Real Name: Mo Azfar
Location: Kuala Lumpur, MY
Contact:

Re: Dynamic Field wont show up in AgentTicketZoom

Post by skullz »

First of all, the dynamic field and its value must be existed.
Can you share the screenshot of agent ticket zoom dynamic field setting?
My Github
OTRS CE/LTS Discord Channel
Cant Update Package Anymore ? Check This

Professional OTRS, Znuny & OTOBO services: efflux.de/en
Free and premium add-ons: English
Dietrich1337
Znuny newbie
Posts: 11
Joined: 10 May 2023, 13:06
Znuny Version: 7.0
Real Name: Marcel Carus

Re: Dynamic Field wont show up in AgentTicketZoom

Post by Dietrich1337 »

Attached are Screenshots of the given settings. I used a fixed value ( test1337 ) but it wont show up. I also tried to intergrated a Value from our db through the X-OTRS-DynamicField_Value. But that wont work too. In the Ticketinformation, there is no new field named "E-Mail".
You do not have the required permissions to view the files attached to this post.
root
Administrator
Posts: 4249
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Dynamic Field wont show up in AgentTicketZoom

Post by root »

Hi,

The default value is only used when you edit the field as a preset. The value does not exists until it's once entered. To set default values for new created tickets the system configuration Ticket::EventModulePost###9600-TicketDynamicFieldDefault needs to be enabled and Ticket::TicketDynamicFieldDefault###ElementX configured.

Dynamic fields are only shown in AgentTicketZoom when they don't have an empty value.

- 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 ?
Dietrich1337
Znuny newbie
Posts: 11
Joined: 10 May 2023, 13:06
Znuny Version: 7.0
Real Name: Marcel Carus

Re: Dynamic Field wont show up in AgentTicketZoom

Post by Dietrich1337 »

Thank you for your reply,

I am getting in touch in how the system works. Maybe you can assist me further. I adapt the configuration from our previous system. An old ( really old ) version of Kix-OTRS.

We are now using a combination of different softwares, to fetch mails in Znuny. Procmail, Fetchmail and a python script, to add database data to the email.
It is working but I am doing something wrong, because the data should show up in the ticketzoom. The script was not written by me, and I am still learning ;)

First, our Procmail Configuration:

Code: Select all

# Procmail
SHELL=/bin/sh
LOGFILE="/var/log/procmail/procmail.log"
SYS_HOME=/opt/znuny
PATH=/bin:/usr/bin:/usr/local/bin
#VERBOSE=${VERBOSE:-yeah}

:0 hw
SENDERFROM=|formail -xFrom:
LOG="--- Logging ${SENDERFROM}"
:0 fhw
|bash -c 'eval formail `python /opt/scripts/data_from_database.py "${SENDERFROM}"`'

:0 w
| $SYS_HOME/bin/znuny.Console.pl Maint::PostMaster::Read
Fetchmail

Code: Select all

#set no syslog
#set logfile /var/log/fetchmail.log

poll localhost protocol IMAP port 1993
user "account" is znuny here
password 'password'
fetchlimit 100
keep
sslproto ""
mda "/usr/bin/procmail -d %T"
And finally our own python script, with a sql query. In the end, only the last line is important:

Code: Select all

print("-I\"X-OTRS-DynamicField_knr: %s\" -I\"X-OTRS-DynamicField_email1: %s\"" % (row['KDNUMMER'],a))
The values exist.

Attached are screenshots of the Znuny settings.

Can you give me a hint, where I did something wrong/missed something?


Kind regards

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

Re: Dynamic Field wont show up in AgentTicketZoom

Post by root »

Hi,

More important than your scripts is if the X-OTRS header is set when the "arrive" in Znuny?
You can verify this by enable the setting Ticket::Frontend::PlainView. After deploying there is a new menu item "Plain Format"
SCR-20240621-ixsg.png
Then you can verify if the fields are set:
SCR-20240621-ixuk.png
- Roy
You do not have the required permissions to view the files attached to this post.
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 ?
Dietrich1337
Znuny newbie
Posts: 11
Joined: 10 May 2023, 13:06
Znuny Version: 7.0
Real Name: Marcel Carus

Re: Dynamic Field wont show up in AgentTicketZoom

Post by Dietrich1337 »

Hey Roy,

thank you for your reply. You were right about the Header. It doesnt show up in the PlainView. I fixed it and now the Header is set. Attached a screenshot. Unfortunatly, it still wont show up in the Ticket-Information.

What do I miss here?

As from what I understand, the dynamic Field is set in Znuny. The Email is sent with the corresponding header and an existing value ( hardcoded for testing ).

I probably have to configure or active something somewhere, but I am a bit clueless. Can you help?
You do not have the required permissions to view the files attached to this post.
root
Administrator
Posts: 4249
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Dynamic Field wont show up in AgentTicketZoom

Post by root »

Hi,

Have you checked that the dynamic fields are shown and set in the ticket history?

- 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 ?
Dietrich1337
Znuny newbie
Posts: 11
Joined: 10 May 2023, 13:06
Znuny Version: 7.0
Real Name: Marcel Carus

Re: Dynamic Field wont show up in AgentTicketZoom

Post by Dietrich1337 »

Hmm, they are not shown and are not set. I guess I missed something really important :D
root
Administrator
Posts: 4249
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Dynamic Field wont show up in AgentTicketZoom

Post by root »

Dietrich1337 wrote: 25 Jun 2024, 09:36 Hmm, they are not shown and are not set. I guess I missed something really important :D
Hi,

Is this a newly created ticket or a follow-up to an existing ticket?

- 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 ?
Dietrich1337
Znuny newbie
Posts: 11
Joined: 10 May 2023, 13:06
Znuny Version: 7.0
Real Name: Marcel Carus

Re: Dynamic Field wont show up in AgentTicketZoom

Post by Dietrich1337 »

At the moment, it is a newly created ticket.

For follow-up tickets in the future it wont be necessary to add additional data ( for now ;) ).
Dietrich1337
Znuny newbie
Posts: 11
Joined: 10 May 2023, 13:06
Znuny Version: 7.0
Real Name: Marcel Carus

Re: Dynamic Field wont show up in AgentTicketZoom

Post by Dietrich1337 »

I found my mistake and it is working as intended now.

In the Docs ( https://doc.znuny.org/znuny/annexes/x_h ... index.html ), I found this entry:

Code: Select all

X-OTRS-DynamicField_Field Value Value depends on dynamic field type. Must be a field of object Ticket.
The problem is, it is not working with "_" but with "-". I checked the Headers in our old OTRS System and it was submitted like this. Changed it in my configuration and the problem is fixed.

I am not sure, if it is intended ( probably not ), so for every other guy, who has the same problem. Don´t use "_".

Maybe an Admin can fix it in the docs.

Have a nice, sunny day and thank you for your guidance skullz and Roy
root
Administrator
Posts: 4249
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Dynamic Field wont show up in AgentTicketZoom

Post by root »

Dietrich1337 wrote: 26 Jun 2024, 13:17
Maybe an Admin can fix it in the docs.
Hi,

If you find that something is wrong it's always possible to create an issue in the repository (https://github.com/znuny/manual/issues/new) to make sure that it's recognized.

- 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 ?
Locked