<div dir="ltr">Simply copy everything between (and including) the outermost curly braces in the location where you'd like a comma-separated list of ticket numbers to appear.<div><br></div><div>Basically any curly brace construct will be replaced with something else when the template is evaluated.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 17 December 2014 at 18:36, Thomas Westlund <span dir="ltr"><<a href="mailto:thomas@westlund.no" target="_blank">thomas@westlund.no</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div>Hi,</div><div><br></div><div>Thanks for your reply</div><div><br></div><div>I'm fairly new RT an my perl skills at not to good either.</div><div><br></div><div>How would I go about outputting this in a template?</div><div><br></div><div>--</div><div>Thomas<br><br><br></div><div><div class="h5"><div><br>On 17. des. 2014, at 00.28, Alex Peters <<a href="mailto:alex@peters.net" target="_blank">alex@peters.net</a>> wrote:<br><br></div><blockquote type="cite"><div><div dir="ltr">You're getting an RT::Links instance, which is an iterator. I've used something like this with success:<div><br></div><div>Related ticket IDs: {</div><div> my @refers_to_ids;</div><div> my $refers_to = $Ticket->RefersTo;</div><div> while (my $link = $refers_to->Next) {</div><div> next unless $link->BaseURI->IsLocal; # skip over non-ticket links</div><div> push @refers_to_ids, $link->BaseObj->id;</div><div> }</div><div> return join(q{, }, map { "#$_" } sort @refers_to_ids;</div><div>}</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 17 December 2014 at 07:51, Thomas Westlund <span dir="ltr"><<a href="mailto:thomas@westlund.no" target="_blank">thomas@westlund.no</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u></u>
<div>
<p dir="LTR"><span lang="no"><font face="Calibri">Hi,</font></span></p>
<p dir="LTR"><span lang="no"></span><span lang="en-gb"><font face="Calibri">I want to display the ID of related Tickets in my template</font></span></p>
<p dir="LTR"><span lang="no"></span><span lang="en-gb"></span></p>
<p dir="LTR"><span lang="en-gb"><font face="Calibri">I tried using this</font></span><span lang="no"></span><span lang="en-gb"><font face="Calibri"></font></span><span lang="no"></span><span lang="en-gb"> <font face="Calibri"></font></span><span lang="no"></span><span lang="en-gb"> <font face="Calibri">{$Ticket->RefersTo}</font></span><span lang="no"></span><span lang="en-gb"></span></p>
<p dir="LTR"><span lang="en-gb"><font face="Calibri">But that just returns</font></span><span lang="no"></span><span lang="no"></span><span lang="no"></span><span lang="en-gb"> <font color="#000000" face="Arial">RT::Links=HASH(0x7f6dc46f7d20</font></span><span lang="no"></span><span lang="no"></span><span lang="no"></span><span lang="en-gb"><font color="#000000" face="Arial">)</font></span><span lang="no"></span><span lang="no"></span><span lang="no"></span><span lang="en-gb"></span></p>
<p dir="LTR"><span lang="en-gb"><font color="#000000" face="Arial">How can I expand this to the ID of the related object?</font></span><span lang="no"></span><span lang="no"></span><span lang="no"></span><span lang="en-gb"></span></p>
<p dir="LTR"><span lang="en-gb"><font color="#000000" face="Arial">Regards</font></span><span lang="no"></span><span lang="no"></span><span lang="no"></span><span lang="en-gb"></span></p>
<p dir="LTR"><span lang="no"></span><span lang="no"></span><span lang="no"></span><span lang="en-gb"></span></p>
<p dir="LTR"><span lang="en-gb"><font color="#000000" face="Arial">--</font></span></p>
<p dir="LTR"><span lang="en-gb"><font color="#000000" face="Arial">Thomas</font></span><span lang="no"></span><span lang="en-gb"></span></p>
</div>
</blockquote></div></div>
</div></blockquote></div></div></div></blockquote></div></div>