Closed Bug 1480042 Opened 6 years ago Closed 6 years ago

Request queue dropdown badge shows empty names for some display names

Categories

(bugzilla.mozilla.org :: Extensions, defect)

Production
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: Fallen, Assigned: kohei)

References

Details

Attachments

(2 files)

Attached image Screenshot
We have a contributor who is just known by his nickname, and he uses [:MakeMyDay] as his bugzilla display name so the commonly used :nickname completion works.

The review queue popup in the top bar makes it say "asked you for review...", without any name. If the real name is empty, I'd suggest to either parse out the nickname from the first [:nickname], or just fall back to displaying the whole thing.
Assignee: nobody → kohei.yoshino
Status: NEW → ASSIGNED
We have an obvious inconsistency in how people’s names are displayed, but given that Bugzilla is introducing nick names (Bug 1476288), it’s better to use them everywhere, just like GitHub. The modal bug page is already displaying nick names in some parts, or their email address’ name part as a fallback. So in this case, [:MakeMyDay] will be simply MakeMyDay. PR coming shortly.
The new nickname extracts:

fetch('https://bugzilla.mozilla.org/request.cgi?action=queue&requestee=philipp%40bugzilla.kewis.ch&group=requestee&ctype=json')
  .then(response => response.json())
  .then(requests => requests.map(req => {
    const [, name, email] = req.requester.match(/^(?:(.*)\s<)?(.+?)>?$/);
    const nickname = ((name || '').match(/\:(.+?)\b/) || [])[1] || email.split('@')[0];
    return nickname;
  }))
  .then(nicknames => console.dir(nicknames));
Attached file pull request
Merged to master.
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Depends on: 1508903
Depends on: 1511261
Type: enhancement → defect
No longer depends on: 1511261
Regressions: 1511261
No longer depends on: 1508903
Regressions: 1508903
Component: Extensions: Review → Extensions
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: