[rt-users] MakeClicky call back example doesn't seem to work (RT3.8.4)
Justin Hayes
justin.hayes at orbisuk.com
Tue Jul 14 16:53:30 EDT 2009
Here's the output from that debug you suggested adding:
Jul 14 21:50:42 cetus RT: $VAR1 = {
'all_matches' => [
'Ticket #1',
undef,
undef,
undef,
undef,
undef,
undef,
undef,
undef
],
'Message' => [
{
'text' => 'Ticket #1 [b]this is bold[/b]',
'empty' => '',
'quoter' => '',
'raw' => 'Ticket #1 [b]this is bold[/b]'
},
{
'text' =>
'---------------------------------------------',
'empty' => '',
'quoter' => '',
'raw' =>
'---------------------------------------------'
-------------------------------------------------
Justin Hayes
Orbis Support Manager
justin.hayes at orbisuk.com
On 14 Jul 2009, at 21:14, Kevin Falcone wrote:
> On Tue, Jul 14, 2009 at 06:12:16PM +0100, Justin Hayes wrote:
>> Hi,
>> Has anyone tried the example MakeClicky Callback in the docs
>> (extending_clickable_links.pod)?
>> I've added the following as a callback as it says :
>
> I just tried with your code and with the code copied from pod and it
> worked for me without any tweaking (RT 3.8.4). I suggest you add the
> following piece of debugging and see what you get. Otherwise you're
> going to need to instrument MakeClicky itself.
>
> You don't mention your RT version of your perl version, both of which
> might be interesting.
>
> -kevin
>
>> <%ARGS>
>> $types => []
>> $actions => {}
>> </%ARGS>
>> <%INIT>
>> my $web_path = RT->Config->Get('WebPath');
>> # action that takes ticket ID as argument and returns link to
>> the ticket
>> $actions->{'link_ticket'} = sub {
>> my %args = @_;
> use Data::Dumper; $RT::Logger->error(Dumper \%args);
>> my $id = $args{'all_matches'}[1];
>> return qq{<a href="$web_path/Ticket/Display.html?id=$id">
>> $args{value}</a>};
>> };
>> # add action to the list
>> push @$types, {
>> # name, that should be used in config to activate action
>> name => 'short_ticket_link',
>> # regular expression that matches text 'ticket #xxx'
>> regex => qr{ticket\s+#(\d+)}i,
>> # name of the action that should be applied
>> action => 'link_ticket',
>> };
>> </%INIT>
> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>
> Community help: http://wiki.bestpractical.com
> Commercial support: sales at bestpractical.com
>
>
> Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
> Buy a copy at http://rtbook.bestpractical.com
More information about the rt-users
mailing list