summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2018-06-08 17:53:38 +0200
committerFlorian Pritz <bluewind@xinu.at>2018-12-06 11:30:11 +0100
commitb4049febdc77ece25cb17bca6984076638e3ad5e (patch)
tree4447a5f7cac6716b7975588e25a2612bd085ae5d
parent8a4c2433edc19ca110339004d658ed54586c76d0 (diff)
downloadbugzilla-b4049febdc77ece25cb17bca6984076638e3ad5e.tar.gz
bugzilla-b4049febdc77ece25cb17bca6984076638e3ad5e.tar.xz
Migrate: Create comments for attachments
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rw-r--r--Bugzilla/Migrate.pm9
1 files changed, 9 insertions, 0 deletions
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);