]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 813191 - Bug.add_attachment should only return the attachment ID
authorHugo <hugo.seabrook@gmail.com>
Fri, 30 Nov 2012 19:14:10 +0000 (14:14 -0500)
committerDave Lawrence <dlawrence@mozilla.com>
Fri, 30 Nov 2012 19:14:10 +0000 (14:14 -0500)
r=dkl, a=LpSolit

Bugzilla/WebService/Bug.pm

index 7c3d7cca64511d1c819a67a6012994c53fe8eeba..f4181c336dbe2accc187a25b5d119c423fa15dd0 100644 (file)
@@ -659,10 +659,9 @@ sub add_attachment {
 
     $_->send_changes() foreach @bugs;
 
-    my %attachments = map { $_->id => $self->_attachment_to_hash($_, $params) }
-                          @created;
+    my @created_ids = map { $_->id } @created;
 
-    return { attachments => \%attachments };
+    return { ids => \@created_ids };
 }
 
 sub add_comment {
@@ -2562,7 +2561,7 @@ Bugzilla B<4.4>.
 
 =head2 add_attachment
 
-B<UNSTABLE>
+B<STABLE>
 
 =over
 
@@ -2625,9 +2624,8 @@ Defaults to False if not specified.
 
 =item B<Returns>
 
-A single item C<attachments>, which contains the created
-attachments in the same format as the C<attachments> return
-value from L</attachments>.
+A single item C<ids>, which contains an array of the
+attachment id(s) created.
 
 =item B<Errors>
 
@@ -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 return value has changed in Bugzilla B<4.4>.
+
 =back
 
 =back