[%# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# This Source Code Form is "Incompatible With Secondary Licenses", as
# defined by the Mozilla Public License, v. 2.0.
#%]
[% INCLUDE global/header.html.tmpl
title = "$terms.Bugzilla QuickSearch",
style_urls = ['skins/standard/page.css']
onload = 'document.forms[\'f\'].quicksearch.focus()'
%]
[% USE Bugzilla %]
If you just put a word or series of words in the search box,
Bugzilla will search the
[%+ field_descs.product FILTER html %],
[%+ field_descs.component FILTER html %],
[%+ IF use_keywords %][%+ field_descs.keywords FILTER html %],[% END %]
[%+ field_descs.alias FILTER html %],
[%+ field_descs.short_desc FILTER html %],
[%+ IF Param('usestatuswhiteboard') %][% field_descs.status_whiteboard FILTER html %],[% END %]
and [% field_descs.longdesc FILTER html %] fields for your word or words.
Typing just a number in the search box will take
you directly to the [% terms.bug %] with that ID. Also, just typing the
alias of [% terms.abug %] will take you to that [% terms.bug %].
Adding more terms narrows down the search, it does not
expand it. (In other words, Bugzilla searches for
[%+ terms.bugs %] that match all your criteria, not
[%+ terms.bugs %] that match any of your criteria.)
Searching is case-insensitive. So table,
Table, and TABLE are all the same.
Bugzilla does not just search for the exact word you put in,
but also for any word that contains that word.
So, for example, searching for "cat" would also find [% terms.bugs %]
that contain it as part of other words—for example, [% terms.abug %]
mentioning "catch" or "certificate". It
will not find partial words in the [% field_descs.longdesc FILTER html %]
or [% field_descs.keywords FILTER html %] fields,
though—only full words are matched, there.
By default, only open [% terms.bugs %] are
searched. If you want to know how to also search closed [% terms.bugs %],
see the Advanced Shortcuts section.
If you want to search specific fields, you do it like
field:value, where field is one of the
field names lower down in this
document and value is the value you want to search for
in that field. If you put commas in the value, then it is
interpreted as a list of values, and [% terms.bugs %] that match
any of those values will be searched for.
All open [% terms.bugs %] where userA@company.com is in the CC list
(no need to mention open [% terms.bugs %], this is the default): cc:userA@company.com
All unconfirmed [% terms.bugs %] in product productA (putting the
[%+ terms.bug %] status at the first position make it being automagically
considered as [% terms.abug %] status): UNCONFIRMED product:productA
All open and closed [% terms.bugs %] reported by userB@company.com
(we must specify ALL as the first word, else only open [% terms.bugs %]
are taken into account): ALL reporter:userB@company.com
All open [% terms.bugs %] with severity blocker or critical with the
target milestone set to 2.5: severity:blocker,critical milestone:2.5
All open [% terms.bugs %] in the component Research & Development
with priority P1 or P2 (we must use quotes for the component as its name
contains whitespaces): component:"Research & Development" priority:P1,P2
Fields You Can Search On
You can specify any of these fields like field:value
in the search box, to search on them. You can also abbreviate
the field name, as long as your abbreviation matches only one field name.
So, for example, searching on stat:VERIFIED will find all
[%+ terms.bugs %] in the VERIFIED status. Some fields have
multiple names, and you can use any of those names to search for them.
[% IF Bugzilla.active_custom_fields.size %]
[% SET first_field = Bugzilla.active_custom_fields.0 %]
For custom fields, they can be used and abbreviated
based on the part of their name after the cf_
if you'd like, in addition to their standard name starting with
cf_. So for example,
[% first_field.name FILTER html %] can be
referred to as
[% first_field.name.replace('^cf_') FILTER html %],
also. However, if this causes a conflict between the standard
Bugzilla field names and the custom field names, the
standard field names always take precedence.
[% END %]
[% SET field_table = {} %]
[% FOREACH field = quicksearch_field_names.keys %]
[% description = field_descs.$field %]
[% field_table.$description = quicksearch_field_names.${field} %]
[% END %]
Field
Field Name(s) For Search
[% FOREACH desc = field_table.keys.sort %]
[% desc FILTER html %]
[% FOREACH nickname = field_table.$desc %]
[% nickname FILTER html %]
[% ", " UNLESS loop.last %]
[% END %]
[% END %]
Advanced Features
If you want to search for a phrase or something that
contains spaces, commas, colons or quotes, you must put it in quotes, like:
"yes, this is a phrase". You must also use quotes to search for
characters that would otherwise be interpreted specially by quicksearch.
For example, "this|that" would search for the literal string
this|that and would not be parsed as "this OR that".
Also, "-field:value" would search for the literal phrase
-field:value and would not be parsed as
"NOT field:value".
You can use AND, NOT,
and OR in searches.
You can also use - to mean "NOT", and | to mean "OR".
There is no special character for "AND", because by default any search
terms that are separated by a space are joined by an "AND".
Examples:
NOT:
Use -summary:foo to exclude
[%+ terms.bugs %] with foo in the summary. NOT summary:foo would have the same effect.
AND: foo bar searches for [% terms.bugs %] that contains
both foo and bar. foo AND bar would have the same effect.
OR: foo|bar would search
for [% terms.bugs %] that contain foo OR bar. foo OR bar would have the same effect.
You cannot use | nor OR to enumerate possible values for a given field.
You must use commas instead. So field:value1,value2 does what
you expect, but field:value1|value2 would be treated as
field:value1 OR value2, which means value2 is not bound to
the given field.
OR has higher precedence than AND; AND is the top level operation.
For example:
Searching for url|location bar|field -focus means
(url OR location) AND (bar OR
field) AND (NOT focus)
Advanced Shortcuts
In addition to using field names to search
specific fields, there are certain characters or words that you can
use as a "shortcut" for searching certain fields:
Field
Shortcut(s)
[% field_descs.bug_status FILTER html %]
Make the first word of your search the name of any
status, or even an abbreviation of any status, and [% terms.bugs %]
in that status will be searched. ALL
is a special shortcut that means "all statuses".
OPEN is a special shortcut that means
"all open statuses".
[% field_descs.resolution FILTER html %]
Make the first word of your search the name of any
resolution, or even an abbreviation of any resolution, and
[%+ terms.bugs %] with that resolution will be searched. For example,
making FIX the first word of your search will find all
[%+ terms.bugs %] with a resolution of FIXED .
[% field_descs.priority FILTER html %]
"P1" (as a word anywhere in
the search) means "find [% terms.bugs %] with the highest priority.
"P2" means the second-highest priority, and so on.
Searching for "P1-3" will find [% terms.bugs %] in
any of the three highest priorities, and so on.
[% field_descs.assigned_to FILTER html %]
@value
[% field_descs.product FILTER html %] or
[%+ field_descs.component FILTER html %]
:value
[% IF use_keywords %]
[% field_descs.keywords FILTER html %]
!value
[% END %]
[% SET key = "flagtypes.name" %]
[% field_descs.$key FILTER html %]
flag?requestee
[% field_descs.longdesc FILTER html %]
or [% field_descs.short_desc FILTER html %]
#value
[% IF Param('usestatuswhiteboard') %]
[% field_descs.short_desc FILTER html %]
or [% field_descs.status_whiteboard FILTER html %]
[value
[% END %]
Examples of Complex Queries
It is pretty easy to write rather complex queries without too much effort.
For very complex queries, you have to use the
Advanced Search form.
All [% terms.bugs %] reported by userA@company.com or assigned to him
(the initial @ is a shortcut for the assignee, see the
Advanced Shortcuts section above): ALL @userA@company.com OR reporter:userA@company.com
All open [% terms.bugs %] in product productA with either severity
blocker, critical or major, or with priority P1, or with the blocker+
flag set, and which are neither assigned to userB@company.com nor to
userC@company.com (we make the assumption that there are only two users
matching userB and userC, else we would write the whole login name): :productA sev:blocker,critical,major OR pri:P1 OR flag:blocker+ -assign:userB,userC
All FIXED [% terms.bugs %] with the blocker+ flag set, but without
the approval+ nor approval? flags set: FIXED flag:blocker+ -flag:approval+ -flag:approval?
[% terms.Bugs %] with That's a "unusual" issue in the
[%+ terms.bug %] summary (double quotes are escaped using \"): summary:"That's a \"unusual\" issue"