Commit 02f4d9da authored by Hugo's avatar Hugo Committed by Dave Lawrence

Bug 813191 - Bug.add_attachment should only return the attachment ID

r=dkl, a=LpSolit
parent 58b8c706
...@@ -659,10 +659,9 @@ sub add_attachment { ...@@ -659,10 +659,9 @@ sub add_attachment {
$_->send_changes() foreach @bugs; $_->send_changes() foreach @bugs;
my %attachments = map { $_->id => $self->_attachment_to_hash($_, $params) } my @created_ids = map { $_->id } @created;
@created;
return { attachments => \%attachments }; return { ids => \@created_ids };
} }
sub add_comment { sub add_comment {
...@@ -2562,7 +2561,7 @@ Bugzilla B<4.4>. ...@@ -2562,7 +2561,7 @@ Bugzilla B<4.4>.
=head2 add_attachment =head2 add_attachment
B<UNSTABLE> B<STABLE>
=over =over
...@@ -2625,9 +2624,8 @@ Defaults to False if not specified. ...@@ -2625,9 +2624,8 @@ Defaults to False if not specified.
=item B<Returns> =item B<Returns>
A single item C<attachments>, which contains the created A single item C<ids>, which contains an array of the
attachments in the same format as the C<attachments> return attachment id(s) created.
value from L</attachments>.
=item B<Errors> =item B<Errors>
...@@ -2666,6 +2664,8 @@ You set the "data" field to an empty string. ...@@ -2666,6 +2664,8 @@ You set the "data" field to an empty string.
=item The C<is_url> parameter was removed in Bugzilla B<4.2>. =item The C<is_url> parameter was removed in Bugzilla B<4.2>.
=item The return value has changed in Bugzilla B<4.4>.
=back =back
=back =back
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment