Make bug: an alias for tr: in search

Too many people have already contacted me saying they want
bug: as an alias for tr:.  So make it so.

Change-Id: Ie9ccfced417de35f0aca5ce892d96a8cf345af16
Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
Shawn O. Pearce 2010-06-16 15:39:33 -07:00
parent 305b556e8d
commit 91763a0d13
2 changed files with 7 additions and 5 deletions

View File

@ -1552,12 +1552,14 @@ code, or standard color name.
By default a shade of yellow, `FFFFCC`.
[[trackingid]] Section trackingid
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Tagged footer lines containing references to exteranal tracking systems,
parsed out of the commit message and saved in Gerrit's DB.
Tagged footer lines containing references to external tracking
systems, parsed out of the commit message and saved in Gerrit's
database.
The tracking ids are serachable using tr:<tracking id>.
The tracking ids are serachable using tr:<tracking id> or
bug:<tracking id>.
----
[trackingid "jira-bug"]

View File

@ -270,7 +270,7 @@ public class ChangeListServiceImpl extends BaseServiceImplementation implements
if (parsedQuery.length > 1) {
want.addAll(changesReviewedBy(db, parsedQuery[1]));
}
} else if (query.contains("tr:")) {
} else if (query.contains("bug:") || query.contains("tr:")) {
String[] parsedQuery = query.split(":");
if (parsedQuery.length > 1) {
want.addAll(changesReferencingTr(db, parsedQuery[1]));