NameX field in notifications?

Moderator: crythias

Post Reply
cbg
Znuny expert
Posts: 169
Joined: 25 Jun 2016, 23:29
Znuny Version: 5.0.9

NameX field in notifications?

Post by cbg »

Hi there,

I was wondering, how to add the NameX field from the agent preferences into the SysConfig Core: Notificatons like this:
[% Data.CreateBy.DynamicField_NameX %]

I tested this above, which does not work?

Any ideas?

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

Re: NameX field in notifications?

Post by root »

Hi,

I'm sorry but I don't really get it. Do you want to use agent preferences for SysConfig settings or in notifications?

- 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 ?
cbg
Znuny expert
Posts: 169
Joined: 25 Jun 2016, 23:29
Znuny Version: 5.0.9

Re: NameX field in notifications?

Post by cbg »

Dear Roy,

I want the agents to set a value in the NameX field within the Agent preferences and then a notification will be sent out containing that particular value.

I did some testings but it seems, that the notification cannt handle [% Data.DynamicField_NameX %]

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

Re: NameX field in notifications?

Post by root »

Hi,

Ok, if you already have a preference for the user it's simple:

- <OTRS_CURRENT_UserXXX> for the agent who triggered the notification (if available)
- <OTRS_OWNER_UserXXX> - for the owner
- <OTRS_RESPONSIBLE_UserXXX> - for the responsible (if available)

This would be the XML file which should be placed in Kernel/Config/Files, name it sth like MyCustomization.xml

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<otrs_config version="1.0" init="Config">
    <ConfigItem Name="PreferencesGroups###AgentPrefXXX" Required="0" Valid="1">
        <Description Translatable="1">The agent's preference  XXX.</Description>
        <Group>SenSW-AgentPreferences</Group>
        <SubGroup>Frontend::Agent::Preferences</SubGroup>
        <Setting>
            <Hash>
                <Item Key="Module">Kernel::Output::HTML::Preferences::Generic</Item>
                <Item Key="Column">User Profile</Item>
                <Item Key="Label" Translatable="1">Your label for XXX</Item>
                <Item Key="Key" Translatable="1">UserXXX</Item>
                <Item Key="Block">Input</Item>
                <Item Key="Data">$Env{"UserXXX"}</Item>
                <Item Key="PrefKey">UserXXX</Item>
                <Item Key="Prio">9000</Item>
                <Item Key="Active">1</Item>
            </Hash>
        </Setting>
    </ConfigItem>
</otrs_config>

- 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 ?
Post Reply