OPAR - OPM Package ARchive

Browseable collection of plugins for the popular ticket system software Znuny and ((OTRS)) Community Edition.


HideDynamicFields

Version
6.0.3
Other Versions
3.3.1, 5.0.4, 6.0.7, 6.0.8,
Uploaded by/on
reneeb on 11 Nov 2019
Framework
6.0.x
Links
Download Website
Description
Outputfilter to show/hide dynamic fields based on various ticket attributes

Rate/comment this package

HideDynamicFields

This modules helps you to show/hide dynamic fields in "new ticket" and other dialogs. When an agents changes the selection of a dropdown field, it is checked whether a dynamic field should be shown or hidden.

The standard installation of this addon adds a system configuration option that binds the dynamic field display to the chosen queue.

Hiding dynamic fields based on the selected queue

This is the standard feature of this addon. In several dialogs the dynamic fields can be hidden. First you have to define, which dialogs are affected:

In the system configuration setting Frontend::Output::FilterContent###HideDynamicFields you define in the Templates listing which actions should be handled. By default only AgentTicketEmail and AgentTicketPhone are handled. You can define any dialog where dynamic fields can be shown (e.g. AgentTicketCompose, AgentTicketNote, ...).

The next step is define, which dynamic fields should be hidden for certain queues. If you want to hide the field "OnboardTime" for the queue "IT", you have to define the key "IT" with the value "OnboardTime" in the system configuration setting HideDynamicFields::Filter###Dest.

If the field "SupportContract" when the agent selects the queue "Human Resources" or the ticket is in that queue, you have to define the key "Human Resources" with the value "SupportContract" in the above mentioned setting.

You can hide several fields, just provide a comma separated list of field names in the value part.

Defining your own bindings

But you can define your own bindings:

Create a custom sysconfig definition file. In this example an OTRS >= 6.0.x version is shown:

    <?xml version="1.0" encoding="utf-8"?>
    <otrs_config version="2.0" init="Config">
        <Setting Name="HideDynamicFields::Filter###PriorityID" Required="0" Valid="0">
            <Description Translatable="1">
                Defines which dynamic fields should be hidden for specific priorities
            </Description>
            <Navigation>Filters</Navigation>
            <Value>
                <Hash>
                    <Item Key="1 very low">NameOfDynamicField</Item>
                </Hash>
            </Value>
        </Setting>
    </otrs_config>

The "PriorityID" in the name can be replaced with any dropdown field name in the dialog. In the default installation it is Dest, in this case it is the priority selection (the field is named PriorityID).

The keys in the hash have to be the value of the dropdown for which one or more dynamic fields should be hidden. And the value is the name of the dynamic field.