[SOLVED]Move Up Dynamic fields into "static" field

Moderator: crythias

Locked
Gonzalo
Znuny newbie
Posts: 75
Joined: 06 Nov 2013, 19:20
Znuny Version: 5.0.8
Real Name: Gonzalo

[SOLVED]Move Up Dynamic fields into "static" field

Post by Gonzalo »

Hello.

I need to move up the dynamic field that I created to the top of the ticket, where is the static fields. The dynamic fields appears in the bottom of the ticket (AgentTickectPhone,AgentTicketMail,CustomerTicket). I have attached a image to try to explain that.

When i was using OTRS 3.3.6 can modify that ones in the dtl files (AgentTicketEmail.dtl,...) but now this types of files does not exist.

I try to find but i did not find anything. could you help?

Thanks in advance.
You do not have the required permissions to view the files attached to this post.
Last edited by Gonzalo on 08 Sep 2016, 17:10, edited 1 time in total.
OTRS 5.0.8 with Oracle Linux Server release 7.1 with MariaDB database

---------------------------------------------------------
OTRS 3.3.6 on Centos 6.0 with MySQL database
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: Move Up Dynamic fields into "static" field

Post by reneeb »

In OTRS5 the templates are the Kernel/Output/HTML/Templates/Standard/*.tt files...
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
Gonzalo
Znuny newbie
Posts: 75
Joined: 06 Nov 2013, 19:20
Znuny Version: 5.0.8
Real Name: Gonzalo

Re: Move Up Dynamic fields into "static" field

Post by Gonzalo »

Thanks reneeb!

Now I have the problem that the dynamic field is duplicated.

I tried to hide the dynamic field in Ticket::Frontend::AgentTicketPhone###DynamicField setting to "0" but OTRS have hidden both, in the top and in below.

How could i resolve this problem.

Thanks in advance.
OTRS 5.0.8 with Oracle Linux Server release 7.1 with MariaDB database

---------------------------------------------------------
OTRS 3.3.6 on Centos 6.0 with MySQL database
Gonzalo
Znuny newbie
Posts: 75
Joined: 06 Nov 2013, 19:20
Znuny Version: 5.0.8
Real Name: Gonzalo

Re: Move Up Dynamic fields into "static" field

Post by Gonzalo »

I was trying to do different combinations and anything works with this 3 "parts":

Superior code in AgentTicketPhone.tt in the superior level:

Code: Select all

[% RenderBlockStart("DynamicField_Categoria") %]
                    <div class="Row Row_DynamicField_[% Data.Name | html %]">
                        [% Data.Label %]
                        <div class="Field">
                            [% Data.Field %]
                        </div>
                        <div class="Clear"></div>
                    </div>
[% RenderBlockEnd("DynamicField_Categoria") %]
Inferior Part in AgentTicketPhone.tt, area of the ITSM configuration:

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_Categoria") %]
                    <div class="Row Row_DynamicField_[% Data.Name | html %]">
                        [% Data.Label %]
                        <div class="Field">
                            [% Data.Field %]
                        </div>
                        <div class="Clear"></div>
                    </div>
[% RenderBlockEnd("DynamicField_Categoria") %]
Inside the Sysconfig --> AgentTickectPhone Ticket::Frontend::AgentTicketPhone###DynamicField



Combinations:

Code superior : Not comment
Code inferior: Not Comment
Sysconfig: set the dynamic field and with a value of 1.
Result: Duplicated field (superior and inferior part of the ticket)

Code superior : Not comment
Code inferior: Not Comment
Sysconfig: set the dynamic field and with a value of 0.
Result: hidden field


Code superior : Not comment
Code inferior: Comment (#)
Sysconfig: set the dynamic field and with a value of 0.
Result: Any field

Code superior : Not comment
Code inferior: Comment (#)
Sysconfig: set the dynamic field and with a value of 1.
Result: Duplicated field (superior and inferior part of the ticket)

Code superior : Not comment
Code inferior: Not Comment
Sysconfig: removed the field of the sysconfig
Result: hidden field

someone know what it is the problem?

Thanks
OTRS 5.0.8 with Oracle Linux Server release 7.1 with MariaDB database

---------------------------------------------------------
OTRS 3.3.6 on Centos 6.0 with MySQL database
Gonzalo
Znuny newbie
Posts: 75
Joined: 06 Nov 2013, 19:20
Znuny Version: 5.0.8
Real Name: Gonzalo

Re: Move Up Dynamic fields into "static" field

Post by Gonzalo »

This is the behaviour when the field is duplicated with the dynamic_field "Categoria"
You do not have the required permissions to view the files attached to this post.
OTRS 5.0.8 with Oracle Linux Server release 7.1 with MariaDB database

---------------------------------------------------------
OTRS 3.3.6 on Centos 6.0 with MySQL database
root
Administrator
Posts: 4253
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Move Up Dynamic fields into "static" field

Post by root »

It seems that your modified templates contains two section for displaying the dynamic fields. Remove the one you don't want.
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 ?
Gonzalo
Znuny newbie
Posts: 75
Joined: 06 Nov 2013, 19:20
Znuny Version: 5.0.8
Real Name: Gonzalo

Re: Move Up Dynamic fields into "static" field

Post by Gonzalo »

Thank you @root

I comment this default code section and now it is working.


#[% 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") %]
OTRS 5.0.8 with Oracle Linux Server release 7.1 with MariaDB database

---------------------------------------------------------
OTRS 3.3.6 on Centos 6.0 with MySQL database
Locked