| Summary: | Return username component of email via RPC if no 'Real Name' is set. | ||
|---|---|---|---|
| Product: | [Community] Bugzilla | Reporter: | Adam Williamson <awilliam> |
| Component: | WebService | Assignee: | Matt Tyson 🤬 <mtyson> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | tools-bugs <tools-bugs> |
| Severity: | high | Docs Contact: | |
| Priority: | medium | ||
| Version: | 4.4 | CC: | huiwang, jmcdonal, mtahir, mtyson, qgong |
| Target Milestone: | 4.4 | Keywords: | Reopened |
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
| Fixed In Version: | 4.4.11048.2 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2016-02-15 00:57:12 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
|
Description
Adam Williamson
2016-01-13 21:48:42 UTC
This is happening because you are not logged in to Bugzilla. If you make the same API call from an account that is logged in, you will get the email address. We have a customization that will hide email addresses unless you are logged in. This was implemented in an attempt to cut down on email address harvesting. Then the documentation should explain this correctly, and in any case, I don't think it's reasonable for the API to return no value, you did not explain that; even if there's no display name for an account, it should return *something*, for instance, the local part of the email address. (In reply to awilliam from comment #2) > Then the documentation should explain this correctly That's reasonable. I'll update the docs. > and in any case, I > don't think it's reasonable for the API to return no value. The API does return a value. It returns the user's full name. Did you see the example of bug #1257553? When you request the 'creator' without being logged in, you get...nothing at all. I'm guessing this is because Joerg's account doesn't have a full name set, but I don't think it's reasonable to return nothing in this case. Specifically, think of the script I'm actually working with here: it's designed to count bug reports per reporter. If Bugzilla just returns nothing when the reporter has no display name, then *all* the reports for *all* reporters with no display name will be counted together, and I (the person consuming the results) have absolutely no idea who any of those bugs was reported by. Using the local part of the email address (i.e. 'joerg.lechner' in that case - the part before the @) would go a long way to solving those problems; OK, maybe sometimes we'd get unlucky and two reporters would have the same one, but it's much better than what it does now. (In reply to awilliam from comment #4) > Using the local part of the email address (i.e. 'joerg.lechner' > in that case - the part before the @) would go a long way to solving those > problems; OK, maybe sometimes we'd get unlucky and two reporters would have > the same one, but it's much better than what it does now. On closer inspection, this is what the web UI does when you view the bug and are not logged in. I'll update the RPC interface to be consistent with this. Verified the issue. The result is PASS. version 4.4.11048.1 Steps: curl --silent --insecure https://bzperfweb01.app.qa.eng.nay.redhat.com/xmlrpc.cgi -H "Content-Type: text/xml" -d "<?xml version='1.0' encoding='UTF-8'?><methodCall><methodName>Bug.get</methodName> <params><param><value><struct><member><name>ids</name><value>1257553</value></member></struct></value></param> </params> </methodCall>" | xpath '//name[contains(text(), "creator")]/../value/string/text()' Found 1 nodes: -- NODE -- joerg.lechner This change is now live. If there are any issues, do not reopen this bug. Instead, you should create a new bug and reference this bug. |