}
my $flags = delete $params->{flags};
+ my $comment = delete $params->{comment};
# Update the values
foreach my $attachment (@attachments) {
foreach my $attachment (@attachments) {
my $changes = $attachment->update();
+ if ($comment = trim($comment)) {
+ $attachment->bug->add_comment($comment,
+ { isprivate => $attachment->isprivate,
+ type => CMT_ATTACHMENT_UPDATED,
+ extra_data => $attachment->id });
+ }
+
$changes = translate($changes, ATTACHMENT_MAPPED_RETURNS);
my %hash = (
# Email users about the change
foreach my $bug (values %bugs) {
- Bugzilla::BugMail::Send($bug->id, { 'changer' => $user });
+ $bug->update();
+ $bug->send_changes();
}
# Return the information to the user
C<string> A short string describing the
attachment.
+=item C<comment>
+
+C<string> An optional comment to add to the attachment's bug.
+
=item C<content_type>
C<string> The MIME type of the attachment, like