Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Don't try to create links to tickets we don't know about

They are probably wrong
  • Loading branch information...
commit 6826f19f69844f5b110886cd514328e6783e82f0 1 parent 098ff22
@afresh1 authored
Showing with 6 additions and 4 deletions.
  1. +6 −4 rt-ticket-importer
View
10 rt-ticket-importer
@@ -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}
);
Please sign in to comment.
Something went wrong with that request. Please try again.