Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Some helper methods for links

because we need all the old tickets and transactions imported before
we can create the links, we need to queue them until the end.
  • Loading branch information...
commit e4639b74891707309032978c0853c98caa4ea859 1 parent 0740cc0
@afresh1 authored
Showing with 21 additions and 0 deletions.
  1. +21 −0 rt-ticket-importer
View
21 rt-ticket-importer
@@ -397,6 +397,27 @@ sub import_link {
}
+{
+ my @link_transactions;
+ my @links;
+
+ sub queue_link_txn { push @link_transactions, @_ }
+
+ sub queue_links {
+ push @links, grep { ref $_ eq 'HASH' and $_->{id} } @_;
+ }
+
+ sub process_queued_links {
+ while ( my $txn = shift @link_transactions ) {
+ ConvertTransaction($txn);
+ }
+
+ while ( my $link = shift @links ) {
+ ConvertLink($link);
+ }
+ }
+}
+
opendir my $dh, $directory or die $!;
my @files = map {"$directory/$_"}
sort grep { $_ =~ /Ticket_\d+\.xml$/i } readdir $dh;
Please sign in to comment.
Something went wrong with that request. Please try again.