]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1537012 - Add creator_detail field to Get Attachment API
authorKohei Yoshino <kohei.yoshino@gmail.com>
Wed, 20 Mar 2019 20:52:37 +0000 (16:52 -0400)
committerGitHub <noreply@github.com>
Wed, 20 Mar 2019 20:52:37 +0000 (16:52 -0400)
Bugzilla/WebService/Bug.pm
docs/en/rst/api/core/v1/attachment.rst

index b69c65f9707016d1fcd3c6e71ca6a2fa59197087..1abe94e56068bbb245f085d2bdb28c165dec2b20 100644 (file)
@@ -1646,6 +1646,11 @@ sub _attachment_to_hash {
     }
   }
 
+  if (filter_wants $filters, 'creator', $types, $prefix) {
+    $item->{'creator_detail'}
+      = $self->_user_to_hash($attach->attacher, $filters, undef, 'creator');
+  }
+
   if (filter_wants $filters, 'data', $types, $prefix) {
     $item->{'data'} = $self->type('base64', $attach->data);
   }
@@ -2331,6 +2336,12 @@ Also returned as C<attacher>, for backwards-compatibility with older
 Bugzillas. (However, this backwards-compatibility will go away in Bugzilla
 5.0.)
 
+=item C<creator_detail>
+
+C<hash> A hash containing detailed user information for the creator. The keys
+included in the user detail hash are the same as ones returned for the Get Bug
+method.
+
 =item C<flags>
 
 An array of hashes containing the information about flags currently set
@@ -2413,6 +2424,8 @@ C<summary>.
 
 =item REST API call added in Bugzilla B<5.0>.
 
+=item The C<creator_detail> field was added in Bugzilla B<6.0>.
+
 =back
 
 
index edba0e2c2482e102007545baf50a2321554ec6e5..ecb1217850120fc404c59b4efe9f38158d209c7a 100644 (file)
@@ -92,6 +92,9 @@ is_patch          boolean   ``true`` if the attachment is a patch, ``false``
                             otherwise.
 creator           string    The login name of the user that created the
                             attachment.
+creator_detail    object    An object containing detailed user information for
+                            the creator. To see the keys included in the user
+                            detail object, see :ref:`rest_single_bug`.
 flags             array     Array of objects, each containing the information
                             about the flag currently set for each attachment.
                             Each flag object contains items descibed in the