<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.18.3">
</HEAD>
<BODY>
I am using RT::Links to iterate over a tickets links in two places.. one in Ticket_Local.pm and one in a dhandler. It works fine within Ticket_Local.pm but not from within the dhandler.<BR>
<BR>
In Ticket_Local.pm, I'm using:<BR>
<BR>
sub FindLinks {<BR>
my $self = shift;<BR>
my $links = new RT::Links($self->CurrentUser);<BR>
$links = $self->Links('Base');<BR>
my $link=$links->Next();<BR>
<BR>
if (defined $link) {<BR>
$RT::Logger->info("found a link from Ticket_Local");<BR>
}<BR>
return 1;<BR>
};<BR>
<BR>
In a dhandler I'm using:<BR>
<BR>
my $ticket = RT::Ticket->new($session{'CurrentUser'} );<BR>
$ticket->Load( $myticketid );<BR>
unless ( $ticket->id ) {<BR>
$RT::Logger->error("Couldn't load ticket #$myticketid");<BR>
return $m->abort( 404 );<BR>
}<BR>
$ticket->FindLinks();<BR>
my $links = new RT::Links($session{'CurrentUser'} );<BR>
$links = $ticket->Links('Base');<BR>
my $link = $links->Next();<BR>
<BR>
if (defined $link) {<BR>
$RT::Logger->info("found a link from dhandler");<BR>
}<BR>
<BR>
<BR>
I only get "found a link from Ticket_Local" in logs.<BR>
<BR>
Anyone know why?<BR>
<BR>
NOTE: I know the example doesn't make sense - but its concise. <IMG SRC="cid:1247062076.9262.21.camel@appserver-wn.dainty.ca" ALIGN="middle" ALT=":)" BORDER="0"><BR>
<BR>
Thanks,<BR>
<BR>
-Bob
</BODY>
</HTML>