Open
Bug 1003304
Opened 10 years ago
Updated 2 months ago
Return 'creator_detail' for /rest/bug/<bug_id>/attachment to avoid additional lookup for real_name
Categories
(Bugzilla :: WebService, enhancement)
Tracking
()
NEW
People
(Reporter: emorley, Unassigned)
References
Details
Attachments
(1 file, 1 obsolete file)
2.22 KB,
patch
|
dkl
:
review+
|
Details | Diff | Splinter Review |
In bug 1003227 comment 3, I'm wanting to find out the email address and display name for attachments, so that qimportbz can fix up the hg patch header when the patch creator has forgotten to include the author info in the patch. The attachment info endpoint (https://bugzilla.mozilla.org/rest/bug/1002780/attachment) only returns 'attacher' (the user_id email address), and not their real_name as well. I could make another call to /rest/user/<attacher_id> to find it out, but given that the main /rest/bug/<bug_id> endpoint returns real_name for a bunch of fields (eg under 'assigned_to_detail', 'cc_detail', 'creator_detail' and 'qa_contact_detail'), it seems we have a precedent for avoiding the additional lookup perhaps? I guess people can use include/exclude fields if they don't require it, to avoid additional joins in the DB query?
Reporter | ||
Comment 1•10 years ago
|
||
Seems like if we were ok with adding this, we should move Bug::_user_to_hash() (added by bug 916254) to Util.pm or User.pm and use it for Bug.get as well as Attachment.get - yeah?
Comment 2•10 years ago
|
||
We should do this as part of the upstream. dkl
Assignee: nobody → webservice
Severity: normal → enhancement
Component: API → WebService
Product: bugzilla.mozilla.org → Bugzilla
QA Contact: default-qa
Target Milestone: --- → Bugzilla 5.0
Version: Production → 4.5.4
(In reply to Ed Morley [:edmorley UTC+0] from comment #0) > I guess people can use include/exclude fields if they don't require it, to avoid additional joins > in the DB query? now that bug 540818 has landed, that's exactly what we should do :)
Updated•10 years ago
|
Target Milestone: Bugzilla 5.0 → ---
Updated•8 years ago
|
Assignee: webservice → mail
Status: NEW → ASSIGNED
Comment 4•8 years ago
|
||
Attachment #8798793 -
Flags: review?(dylan)
Updated•7 years ago
|
Attachment #8798793 -
Flags: review?(dylan) → review?(dylan)
Updated•7 years ago
|
Attachment #8798793 -
Flags: review?(dylan) → review?(gerv)
Updated•7 years ago
|
Assignee: mail → webservice
Status: ASSIGNED → NEW
Comment 5•6 years ago
|
||
Comment on attachment 8798793 [details] [diff] [review] bug1003304-v1.patch I'm sorry, but I will be unable to do this review. My apologies :-( Gerv
Attachment #8798793 -
Flags: review?(gerv)
Updated•6 years ago
|
Attachment #8798793 -
Flags: review?(dkl)
Comment 6•6 years ago
|
||
Comment on attachment 8798793 [details] [diff] [review] bug1003304-v1.patch Review of attachment 8798793 [details] [diff] [review]: ----------------------------------------------------------------- Looks good code-wise. Assume you have tested it with latest master. r=dkl
Attachment #8798793 -
Flags: review?(dkl) → review+
Reporter | ||
Comment 7•5 years ago
|
||
This bug has an r+'d patch - could someone land it?
Comment hidden (spam) |
Updated•2 months ago
|
Attachment #9381636 -
Attachment is obsolete: true
Comment 9•2 months ago
|
||
The content of attachment 9381636 [details] has been deleted for the following reason:
Spam
You need to log in
before you can comment on or make changes to this bug.
Description
•