From: Kohei Yoshino Date: Wed, 20 Mar 2019 20:52:37 +0000 (-0400) Subject: Bug 1537012 - Add creator_detail field to Get Attachment API X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c756b947242f0cc8aa73dc728d58bd19699b0836;p=thirdparty%2Fbugzilla.git Bug 1537012 - Add creator_detail field to Get Attachment API --- diff --git a/Bugzilla/WebService/Bug.pm b/Bugzilla/WebService/Bug.pm index b69c65f97..1abe94e56 100644 --- a/Bugzilla/WebService/Bug.pm +++ b/Bugzilla/WebService/Bug.pm @@ -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, for backwards-compatibility with older Bugzillas. (However, this backwards-compatibility will go away in Bugzilla 5.0.) +=item C + +C 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 An array of hashes containing the information about flags currently set @@ -2413,6 +2424,8 @@ C. =item REST API call added in Bugzilla B<5.0>. +=item The C field was added in Bugzilla B<6.0>. + =back diff --git a/docs/en/rst/api/core/v1/attachment.rst b/docs/en/rst/api/core/v1/attachment.rst index edba0e2c2..ecb121785 100644 --- a/docs/en/rst/api/core/v1/attachment.rst +++ b/docs/en/rst/api/core/v1/attachment.rst @@ -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