Accessing the ticket object from lib/RT/

Hi all,

I am working on extending what you can display in a Custom Field’s URL.
For that, I need to access the ticket object. The problem is that, at
this scoping level, $TicketObj does not exist.
Thus, I need to build a new one, at this point.

I tried to bake my own, using

my $TicketObj = LoadTicket(@{[$self->ObjectId]});

within _FillInTemplateURL() in , which
resulted in

Can’t call method “_Accessible” without a package or object
reference at /usr/local/share/perl/5.8.8/DBIx/SearchBuilder/
line 423.

which smells of lacking context. Is it even possible to do what I want,
here? Am I better off filling the values for this at an earlier point?
If yes, where?

Finally, would such a feature be desirable for RT at large, i.e. would a
patch be accepted?