Closed
Bug 1766121
Opened 2 years ago
Closed 2 years ago
Add a note about nickname syntax in userprefs.cgi Account page
Categories
(bugzilla.mozilla.org :: General, enhancement)
bugzilla.mozilla.org
General
Tracking
()
RESOLVED
FIXED
People
(Reporter: arai, Assigned: arai)
References
Details
Attachments
(1 file)
According to the following code, nickname data is extracted from the real name field and it's used for some field (e.g. Reporter).
It would be nice to mention the syntax and how it's used, in userprefs.cgi
page Account pane, below "Your real name" field, so that it's discoverable.
sub set_name {
my ($self, $name) = @_;
$self->set('realname', $name);
delete $self->{identity};
$self->set('nickname', _generate_nickname($name, $self->login, $self->id));
sub _generate_nickname {
my ($name, $login, $id) = @_;
my ($nick) = extract_nicks($name);
sub extract_nicks {
my ($name) = @_;
return () unless defined $name;
my @nicks = (
$name =~ /
# This negative lookbehind lets us
# match colons that are not followed by numbers.
(?<!\d)
:
# try tp capture a "word", plus some symbols
# this covers most everything people use for IRC nicks
# in BMO.
([\p{IsAlnum}|._-]+)
# require a word terminator, which
# can be the end of the string or some punctuation.
\b
/mgx
);
return grep { defined $_ } @nicks;
}
sub.push("Reporter: " _ bug.reporter.nick);
Assignee | ||
Comment 1•2 years ago
|
||
Assignee: nobody → arai.unmht
Comment 2•2 years ago
|
||
Merged to master.
https://github.com/mozilla-bteam/bmo/commit/219491aa3ea766fb7a8a40f8a51729c8b6b1981e
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•