diff options
author | Mike Frysinger <vapier@gentoo.org> | 2015-05-27 03:57:39 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2016-02-25 05:25:34 +0900 |
commit | 2f3202ed9560b700625912c6702472949ec91ae1 (patch) | |
tree | 844aa5f7cbe0b0bffce1342240309bdeeb485254 | |
parent | GENTOO_NODE: set default to the hostname (diff) | |
download | bugzilla-2f3202ed9560b700625912c6702472949ec91ae1.tar.gz bugzilla-2f3202ed9560b700625912c6702472949ec91ae1.tar.bz2 bugzilla-2f3202ed9560b700625912c6702472949ec91ae1.zip |
quicksearch: support #1234 bugs
Treat "#1234" just like "1234". There are open questions wrt handling of
multiple bugs (such as " #1234, 5678 ,, 666", but let's leave that for
upstream to decide).
X-Gentoo-Bug: 83781
X-Gentoo-Bug-URL: https://bugs.gentoo.org/83781
URL: https://bugzilla.mozilla.org/show_bug.cgi?id=1168739
-rw-r--r-- | Bugzilla/Search/Quicksearch.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Bugzilla/Search/Quicksearch.pm b/Bugzilla/Search/Quicksearch.pm index f062161d8..4f57b4ebc 100644 --- a/Bugzilla/Search/Quicksearch.pm +++ b/Bugzilla/Search/Quicksearch.pm @@ -142,7 +142,7 @@ sub quicksearch { $searchstring =~ s/(^[\s,]+|[\s,]+$)//g; ThrowUserError('buglist_parameters_required') unless ($searchstring); - if ($searchstring =~ m/^[0-9,\s]*$/) { + if ($searchstring =~ m/^#?[0-9,\s]*$/) { _bug_numbers_only($searchstring); } else { @@ -301,6 +301,8 @@ sub _bug_numbers_only { my $cgi = Bugzilla->cgi; # Allow separation by comma or whitespace. $searchstring =~ s/[,\s]+/,/g; + # Trim the leading # if used. + $searchstring =~ s/^#//; if ($searchstring !~ /,/ && !i_am_webservice()) { # Single bug number; shortcut to show_bug.cgi. |