From b4049febdc77ece25cb17bca6984076638e3ad5e Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Fri, 8 Jun 2018 17:53:38 +0200 Subject: Migrate: Create comments for attachments Signed-off-by: Florian Pritz --- Bugzilla/Migrate.pm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Bugzilla/Migrate.pm b/Bugzilla/Migrate.pm index e36b1e46a..dce795400 100644 --- a/Bugzilla/Migrate.pm +++ b/Bugzilla/Migrate.pm @@ -892,6 +892,15 @@ sub _insert_attachments { $submitter->{groups} = $super_user->groups; Bugzilla->set_user($submitter); my $created = Bugzilla::Attachment->create({%$attachment, bug => $bug}); + $self->_insert_comments( + $bug, + [{ + type => CMT_ATTACHMENT_CREATED, + extra_data => $created->id, + who => $created->attacher->login, + bug_when => $created->attached, + }] + ); $self->debug( ' Attachment ' . $created->description . ' from ' . $submitter->login, 2); Bugzilla->set_user($super_user); -- cgit v1.2.3-24-g4f1b