OTRS4 display dynamic fileds at custom place in TicketViewMedium

Moderator: crythias

Locked
sdombora
Znuny newbie
Posts: 16
Joined: 01 Jan 2012, 20:32
Znuny Version: 4.0.7
Real Name: Sándor Dombora
Company: Asyst Solutions

OTRS4 display dynamic fileds at custom place in TicketViewMedium

Post by sdombora »

Hi!

We have the template AgentTicketOverviewMedium.tt, and it has the following code at the end of each row:

Code: Select all

# example of how to use fixed dynamic field blocks for customizations
# Note: Field1 is the name of the field and had to be replaced with the actual
# field name
#[% RenderBlockStart("DynamicField_Field1") %]
#                        <td>
#                            <label>[% Translate(Data.Label) | html %]</label>
#[% RenderBlockStart("DynamicField_Field1Link") %]
#                            <div title="[% Data.Title | html %]"><a href="[% Data.Link | Interpolate %]" target="_blank" class="DynamicFieldLink">[% Data.Value %]</a></div>
#[% RenderBlockEnd("DynamicField_Field1Link") %]
#[% RenderBlockStart("DynamicField_Field1Plain") %]
#                            <div title="[% Data.Title | html %]"><span>[% Data.Value %]</span></div>
#[% RenderBlockEnd("DynamicField_Field1Plain") %]
#                        </td>
#[% RenderBlockEnd("DynamicField_Field1") %]
I tried to activate it, in the following way:

Code: Select all

[% RenderBlockStart("DynamicField_ReportTime") %]
                        <td>
                            <label>[% Translate(Data.Label) | html %]</label>
[% RenderBlockStart("DynamicField_ReportTimeLink") %]
                            <div title="[% Data.Title | html %]"><a href="[% Data.Link | Interpolate %]" target="_blank" class="DynamicFieldLink">[% Data.Value %]</a></div>
[% RenderBlockEnd("DynamicField_ReportTimeLink") %]
[% RenderBlockStart("DynamicField_ReportTimePlain") %]
                            <div title="[% Data.Title | html %]"><span>[% Data.Value %]</span></div>
[% RenderBlockEnd("DynamicField_ReportTimePlain") %]
                        </td>
[% RenderBlockEnd("DynamicField_ReportTime") %]
but nothing happened. I checked the output on the web page, the whole <td> HTML tag is missig.
I also tried to activate the field in Ticket::Frontend::OverviewMedium###DynamicField which puts it in the dynamic filed list at the end of standard field list.

What else should I do to have the dynamic field listed between standard fileds at custom position?

Best Regards,
Sándor Dombora

Otrs4, cenos 6.6
OTRS 3.0, OTRS-ITSM, Suse Linux 11.3
sdombora
Znuny newbie
Posts: 16
Joined: 01 Jan 2012, 20:32
Znuny Version: 4.0.7
Real Name: Sándor Dombora
Company: Asyst Solutions

Re: OTRS4 display dynamic fileds at custom place in TicketViewMedium

Post by sdombora »

Problem solved!

There is bug in TicketOverviewMedium.pm.
The template expects DynamicField_NameX, DynamicField_NameXLink, DynamicField_NameXPlain blocks.
The code writes: DynamicFieldTableRowRecordNameX, DynamicFieldTableRowRecordNameXLink, DynamicFieldTableRowRecordNameXPlain

So the template or the code should be edited to have the fileds displayed!
Good Luck!

Sándor Dombora
OTRS 3.0, OTRS-ITSM, Suse Linux 11.3
Locked