[SOLVED] Dynamic Fields per Template not working anymore since OTRS 6

Moderator: crythias

Post Reply
tpsupport
Znuny newbie
Posts: 75
Joined: 02 Feb 2011, 14:45
Znuny Version: 6.0.12

[SOLVED] Dynamic Fields per Template not working anymore since OTRS 6

Post by tpsupport »

Hi there,

I am having a huge issue since updating to from OTRS 5 to OTRS 6. I used to modify the template (.tt) files to hide the Dynamic Fields by default for everyone using the "Standard" template. Different departments now got their own template with (.tt) files modified to again show only specific Dynamic Fields. This still works for all template files other than AgentTicketActionCommon.tt (used for i.e. AgentTicketClose).

To better show here is the example for OTRS 5.

Removed the following part

Code: Select all

[% RenderBlockStart("DynamicField") %]
                            <div class="Row Row_DynamicField_[% Data.Name | html %]">
                            [% Data.Label %]
                                <div class="Field">
                                [% Data.Field %]
                                </div>
                                <div class="Clear"></div>
                            </div>
[% RenderBlockEnd("DynamicField") %]
Added specific Dynamic Field config

Code: Select all

# example of how to use fixed dynamic field blocks for customizations
# Note: Field1 and Field2 are the names of the fields and had to be replaced with the actual
# field names
#[% RenderBlockStart("DynamicField_Field1") %]
#                <div class="Row Row_DynamicField_[% Data.Name | html %]">
#                    [% Data.Label %]
#                    <div class="Field">
#                        [% Data.Field %]
#                    </div>
#                    <div class="Clear"></div>
#                </div>
#[% RenderBlockEnd("DynamicField_Field1") %]
Now with OTRS 6 AgentTicketActionCommon.tt has changed a bit on this part, there is no dedicated Dynamic Fields section "WidgetDynamicFields" anymore but a "WidgetTicketActions" section where "TicketTypeDynamicField" is is responsible to show the fields.

AgentTicketActionCommon.tt in OTRS 6

Code: Select all

[% RenderBlockStart("TicketTypeDynamicField") %]
                        <div class="Row Row_DynamicField_[% Data.Name | html %]">
                        [% Data.Label %]
                            <div class="Field">
                            [% Data.Field %]
                            </div>
                            <div class="Clear"></div>
                        </div>
[% RenderBlockEnd("TicketTypeDynamicField") %]

If I remove that the Dynamic Fields are gone but I cannot use the customization anymore to only add the specific ones as I was used before.
More or less funny is that the above example is still mentioned in the template file but it simply does not work.

HELP


Thanks,
Rick
Last edited by tpsupport on 20 Jun 2018, 09:06, edited 1 time in total.
Znuny 6.5 LTS - Ubuntu 20.04 x64, Azure Database for MySQL server 5.7, Perl 5.22.1, Apache/2.4.18
tpsupport
Znuny newbie
Posts: 75
Joined: 02 Feb 2011, 14:45
Znuny Version: 6.0.12

Re: Dynamic Fields per Template not working anymore since OTRS 6

Post by tpsupport »

UPDATE: I had reported this as a bug and it has been fixed with OTRS 6.0.6.

Bug: https://bugs.otrs.org/show_bug.cgi?id=13569
Commit: https://github.com/OTRS/otrs/commit/c6e ... 4eb3c97cbd
Znuny 6.5 LTS - Ubuntu 20.04 x64, Azure Database for MySQL server 5.7, Perl 5.22.1, Apache/2.4.18
Post Reply