There is no parameter in link after upgrade mentioned in subject in ViewZoom.
I have several Dynamics Fields of which one has Show link property set to somethink like https://server/script.php?id=$LQData{"TicketID"}, but in ticket overview I get always only static part of URL, TicketID is never present. How can I debug such problem?
TicketID missing in link after 3.0 -> 3.1.6 upgrade
Moderator: crythias
-
- Znuny newbie
- Posts: 2
- Joined: 07 Jul 2012, 18:46
- Znuny Version: 3.1.6
- Real Name: Ondra Knezour
-
- Moderator
- Posts: 10170
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: TicketID missing in link after 3.0 -> 3.1.6 upgrade
I have taken a look at this and can't really figure out why, but it's likely (?) that the rendering of the link comes from information the dynamic field knows, not what the ticket shows.
In AgentTicketZoom.dtl, there is a commented section for showing a specific field block.
And since TicketID renders at this level, I'd assume that you could change the .dtl to provide the TicketID in the link:
Where the Dynamic Field Link will have everything up to and including '='
Note that the word "Field2" should reference the actual field name of your dynamic field.
AgentTicketOverview.dtl has similar construct:
Which could be converted to:
and further down ...
In AgentTicketZoom.dtl, there is a commented section for showing a specific field block.
Code: Select all
#<!-- dtl:block:ArticleDynamicField2Link -->
# <p class="Value" title="$QData{"Title"}"><a href="$Data{"Link"}" target="_blank" class="DynamicFieldLink">$Data{"Value"}</a></p>
#<!-- dtl:block:ArticleDynamicField2Link -->
Code: Select all
<!-- dtl:block:ArticleDynamicField2Link -->
<p class="Value" title="$QData{"Title"}"><a href="$Data{"Link"}$QData{"TicketID"}" target="_blank" class="DynamicFieldLink">$Data{"Value"}</a></p>
<!-- dtl:block:ArticleDynamicField2Link -->
Note that the word "Field2" should reference the actual field name of your dynamic field.
AgentTicketOverview.dtl has similar construct:
Code: Select all
#<!-- dtl:block:OverviewNavBarPageDynamicField_Field2_Sortable -->
# <a name="OverviewControl" href="$Env{"Baselink"}Action=$Env{"Action"};$Data{"LinkSort"};SortBy=DynamicField_$LQData{"DynamicFieldName"};OrderBy=$LQData{"OrderBy"}">$Text{"$Data{"Label"}"}</a>
#<!-- dtl:block:OverviewNavBarPageDynamicField_Field2_Sortable -->
Code: Select all
<!-- dtl:block:OverviewNavBarPageDynamicField_Field2_Sortable -->
<a name="OverviewControl" href="$Env{"Baselink"}Action=$Env{"Action"};$Data{"LinkSort"};SortBy=DynamicField_$LQData{"DynamicFieldName"};OrderBy=$LQData{"OrderBy"}">$Text{"$Data{"Label"}"}</a>
<!-- dtl:block:OverviewNavBarPageDynamicField_Field2_Sortable -->
Code: Select all
<!-- dtl:block:RecordDynamicField2Link -->
<a href="$Data{"Link"}$QData{"TicketID"}" class="DynamicFieldLink">$Data{"Value"}</a>
<!-- dtl:block:RecordDynamicField2Link -->
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
-
- Znuny newbie
- Posts: 2
- Joined: 07 Jul 2012, 18:46
- Znuny Version: 3.1.6
- Real Name: Ondra Knezour
Re: TicketID missing in link after 3.0 -> 3.1.6 upgrade
Thanks for your reply.
I tried suggested in AgentTicketZoom.dtl with strange result.
I'm working with following example code embeded in template (TicketFreeText2 is the name of Dynamic Field in this case):
As can be seen, there is possible to render link or plain text. But both of them works the same way. Title and Value is available, but nothing else, including Link value. They just render empty data.
I resolved this problem temporarily by ugly hack - hardcoding URL before end of element, where $LQData{"TicketID"} works, but it seems for me that something is broken here.
I tried suggested in AgentTicketZoom.dtl with strange result.
I'm working with following example code embeded in template (TicketFreeText2 is the name of Dynamic Field in this case):
Code: Select all
<fieldset class="TableLike FixedLabelSmall">
<!-- dtl:block:TicketDynamicField_TicketFreeText2 -->
<label>$Text{"$Data{"Label"}"}:</label>
<p class="Value">
<!-- dtl:block:TicketDynamicField_TicketFreeText2_Link -->
<span title="$QData{"Title"}"><a href="$Data{"Link"}" target="_blank">$Data{"Value"}</a></span>
<!-- dtl:block:TicketDynamicField_TicketFreeText2_Link -->
#<!-- dtl:block:TicketDynamicField_TicketFreeText2_Plain -->
# <span title="$QData{"Title"}">$Data{"Value"}</span>
#<!-- dtl:block:TicketDynamicField_TicketFreeText2_Plain -->
</p>
<!-- dtl:block:TicketDynamicField_TicketFreeText2 -->
</fieldset>
I resolved this problem temporarily by ugly hack - hardcoding URL before end of element, where $LQData{"TicketID"} works, but it seems for me that something is broken here.
-
- Moderator
- Posts: 10170
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: TicketID missing in link after 3.0 -> 3.1.6 upgrade
This is a real bug. Bug submitted as http://bugs.otrs.org/show_bug.cgi?id=8633
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
-
- Moderator
- Posts: 10170
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: TicketID missing in link after 3.0 -> 3.1.6 upgrade
The code is (not) within Kernel/Modules/AgentTicketZoom.pm
For instance,
is there but there needs to be additional code such as
Edit: %Ticket added because it includes TicketID and all the other stuff.
For instance,
Code: Select all
$Self->{LayoutObject}->Block(
Name => 'TicketDynamicField_' . $DynamicFieldConfig->{Name} . '_Plain',
Data => {
Value => $ValueStrg->{Value},
Title => $ValueStrg->{Title},
},
);
Code: Select all
$Self->{LayoutObject}->Block(
Name => 'TicketDynamicField_' . $DynamicFieldConfig->{Name} . '_Link',
Data => {
Value => $ValueStrg->{Value},
Title => $ValueStrg->{Title},
Link => $ValueStrg->{Link},
$DynamicFieldConfig->{Name} => $ValueStrg->{Title},
%Ticket
},
);
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask