diff options
author | Florian Pritz <bluewind@xinu.at> | 2017-12-27 17:30:03 +0100 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2017-12-27 17:30:03 +0100 |
commit | 0895a8de0cc5d882fa3e319cf10a09191db423bd (patch) | |
tree | e36f26672c893be451007a1f1d7f0a922a3ead3f /Bugzilla/Migrate.pm | |
parent | 0ac51c1e94e45e51bd182f859e89f502a548d973 (diff) | |
download | bugzilla-0895a8de0cc5d882fa3e319cf10a09191db423bd.tar.gz bugzilla-0895a8de0cc5d882fa3e319cf10a09191db423bd.tar.xz |
WIP: misc fixes
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'Bugzilla/Migrate.pm')
-rw-r--r-- | Bugzilla/Migrate.pm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Bugzilla/Migrate.pm b/Bugzilla/Migrate.pm index 1aedbe39f..030369f08 100644 --- a/Bugzilla/Migrate.pm +++ b/Bugzilla/Migrate.pm @@ -716,7 +716,6 @@ sub insert_bugs { my $comments = delete $bug->{comments}; my $history = delete $bug->{history}; my $attachments = delete $bug->{attachments}; - my $dup_id = delete $bug->{dup_id}; $self->debug($bug, 3); @@ -777,9 +776,6 @@ sub insert_bugs { $reporter->{groups} = $super_user->groups; Bugzilla->set_user($reporter); my $created = Bugzilla::Bug->create($bug); - if (defined $dup_id) { - $dbh->do("INSERT INTO duplicates (dupe_of, dupe) VALUES (?, ?)", undef, $dup_id, $created->id); - } $self->debug('Created bug ' . $created->id); Bugzilla->set_user($super_user); @@ -864,6 +860,10 @@ sub _insert_attachments { $self->debug(' Inserting attachments:', 2); foreach my $attachment (@$attachments) { $self->debug($attachment, 3); + my $data_path = delete $attachment->{data_path}; + if (defined $data_path) { + $attachment->{data} = IO::File->new($data_path, 'r'); + } # Make sure that our pointer is at the beginning of the file, # because usually it will be at the end, having just been fully # written to. |