Fix for the link maps that are now in RT::Link.
authorMikal Kolbein Gule <m.k.gule@usit.uio.no>
Mon, 6 Oct 2014 22:55:25 +0000 (00:55 +0200)
committerMikal Kolbein Gule <m.k.gule@usit.uio.no>
Mon, 6 Oct 2014 22:55:25 +0000 (00:55 +0200)
local/lib/RT/Interface/Email/Filter/TakeAction.pm

index f4bd25f..7a96fb4 100644 (file)
@@ -326,8 +326,9 @@ sub GetCurrentUser {
             my %tmp = _ParseAdditiveCommand( \%cmds, 1, $type );
             next unless keys %tmp;
 
-            my $link_type = $ticket_as_user->LINKTYPEMAP->{ $type }->{'Type'};
-            my $link_mode = $ticket_as_user->LINKTYPEMAP->{ $type }->{'Mode'};
+            my $typemap = keys %RT::Link::TYPEMAP ? \%RT::Link::TYPEMAP : $ticket_as_user->LINKTYPEMAP;
+            my $link_type = $typemap->{$type}->{'Type'};
+            my $link_mode = $typemap->{$type}->{'Mode'};
 
             $tmp{'Default'} = [ do {
                 my %h = ( Base => 'Target', Target => 'Base' );