Skip to content

Commit

Permalink
Don't try to create links to tickets we don't know about
Browse files Browse the repository at this point in the history
They are probably wrong
  • Loading branch information
afresh1 committed Aug 12, 2012
1 parent 098ff22 commit 6826f19
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions rt-ticket-importer
Expand Up @@ -349,15 +349,17 @@ sub import_link {

my $base = $link->{Base};
$base =~ /([0-9]*)$/;
$base = $1;
$base = $E{Tickets}{$1};
my $target = $link->{Target};
$target =~ /([0-9]*)$/;
$target = $1;
$target = $E{Tickets}{$1};

return unless $base and $target;

my $linkObj = new RT::Link($RT::SystemUser);
my $newid = $linkObj->Create(
Base => $E{Tickets}{$base},
Target => $E{Tickets}{$target},
Base => $base,
Target => $target,
Type => $link->{Type}
);

Expand Down

0 comments on commit 6826f19

Please sign in to comment.