template tag linked ticket [solved]

Moderator: crythias

Post Reply
ebaccini
Znuny newbie
Posts: 18
Joined: 04 Sep 2017, 11:52
Znuny Version: erizone 5.0.18
Real Name: Emiliano Baccini
Company: ENAV s.p.a.

template tag linked ticket [solved]

Post by ebaccini »

Hi,
OTRS beginner here. I would like to know if there's a way to list linked Tickets in a dynamic way in a template like the example here:

Situation:
Ticket 0001 with 3 linked ticket "normal" relationship (0002-0003-0004)

Template:

Code: Select all

Hi,
	 the ticket <OTRS_TICKET_TicketNumber> have this linked tickets:

<OTRS_TICKET_LinkedTicketNumberList>

Thanks
or something like this.

Thanks in advance.

Emiliano
Last edited by ebaccini on 09 Nov 2017, 16:38, edited 1 time in total.
Emiliano Baccini

ENAV S.p.A. - SIO Roma Ciampino

OTRS 5.0.11
EriZone 5
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: template tag linked ticket

Post by reneeb »

This can only be done with some development...
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
ebaccini
Znuny newbie
Posts: 18
Joined: 04 Sep 2017, 11:52
Znuny Version: erizone 5.0.18
Real Name: Emiliano Baccini
Company: ENAV s.p.a.

Re: template tag linked ticket

Post by ebaccini »

reneeb wrote:This can only be done with some development...
Hi,
thanks for your answer. Can you point me out on how to?
Emiliano Baccini

ENAV S.p.A. - SIO Roma Ciampino

OTRS 5.0.11
EriZone 5
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: template tag linked ticket

Post by reneeb »

You need to override the _Replace() method in Kernel/System/TemplateGenerator.pm. Check if your tag is present in the text and build the list then. You need to use Kernel/System/LinkObject.pm for that...
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
ebaccini
Znuny newbie
Posts: 18
Joined: 04 Sep 2017, 11:52
Znuny Version: erizone 5.0.18
Real Name: Emiliano Baccini
Company: ENAV s.p.a.

Re: template tag linked ticket

Post by ebaccini »

reneeb wrote:You need to override the _Replace() method in Kernel/System/TemplateGenerator.pm. Check if your tag is present in the text and build the list then. You need to use Kernel/System/LinkObject.pm for that...
Ok thank you. I'll sort it out.
Emiliano Baccini

ENAV S.p.A. - SIO Roma Ciampino

OTRS 5.0.11
EriZone 5
ebaccini
Znuny newbie
Posts: 18
Joined: 04 Sep 2017, 11:52
Znuny Version: erizone 5.0.18
Real Name: Emiliano Baccini
Company: ENAV s.p.a.

Re: template tag linked ticket

Post by ebaccini »

Hi,
if everyone ever wanted to know I've found a nice workaround. If you have installed TextAreaFromDB DynamicField type you can manage to have the list of linked ticket via a simple join query. Starting from this you can point directly at this DynamicField_Value to fill your template.
Emiliano Baccini

ENAV S.p.A. - SIO Roma Ciampino

OTRS 5.0.11
EriZone 5
Post Reply