The Bugzilla Search page is the interface where you can find any bug report, comment, or patch currently in the Bugzilla system. You can play with it here: http://landfill.bugzilla.org/bugzilla-2.20-branch/query.cgi.
The Search page has controls for selecting different possible values for all of the fields in a bug, as described above. For some fields, multiple values can be selected. In those cases, Bugzilla returns bugs where the content of the field matches any one of the selected values. If none is selected, then the field can take any value.
Once you've run a search, you can save it as a Saved Search, which appears in the page footer.
Highly advanced querying is done using Boolean Charts.
The boolean charts further restrict the set of results returned by a query. It is possible to search for bugs based on elaborate combinations of criteria.
The simplest boolean searches have only one term. These searches permit the selected left field to be compared using a selectable operator to a specified value. Using the "And," "Or," and "Add Another Boolean Chart" buttons, additional terms can be included in the query, further altering the list of bugs returned by the query.
There are three fields in each row of a boolean search.
Field: the items being searched
Operator: the comparison operator
Value: the value to which the field is being compared
Sometimes, a query needs to compare a field containing a user's ID (such as ReportedBy) with a user's ID (such as the user running the query or the user to whom each bug is assigned). When the operator is either "equals" or "notequals", the value can be "%reporter%", "%assignee%", "%qacontact%", or "%user%." The user pronoun referes to the user who is executing the query or, in the case of whining reports, the user who will be the recipient of the report. The reporter, assignee, and qacontact pronouns refer to the corresponding fields in the bug.
At first glance, negation seems redundant. Rather than searching for
one could search forNOT("summary" "contains the string" "foo"),
However, the search("summary" "does not contain the string" "foo").
would find every bug where anyone on the CC list did not contain "@mozilla.org" while("CC" "does not contain the string" "@mozilla.org")
would find every bug where there was nobody on the CC list who did contain the string. Similarly, the use of negation also permits complex expressions to be built using terms OR'd together and then negated. Negation permits queries such asNOT("CC" "contains the string" "@mozilla.org")
to find bugs that are neither in the update product or in the documentation component orNOT(("product" "equals" "update") OR ("component" "equals" "Documentation"))
to find non-documentation bugs on which the assignee has never commented.NOT(("commenter" "equals" "%assignee%") OR ("component" "equals" "Documentation"))
The terms within a single row of a boolean chart are all constraints on a single piece of data. If you are looking for a bug that has two different people cc'd on it, then you need to use two boolean charts. A search for
would return only bugs with "foo@mozilla.org" on the cc list. If you wanted bugs where there is someone on the cc list containing "foo@" and someone else containing "@mozilla.org", then you would need two boolean charts.("cc" "contains the string" "foo@") AND ("cc" "contains the string" "@mozilla.org")
The bugs listed will be only the bugs where ALL the charts are true.First chart: ("cc" "contains the string" "foo@")
Second chart: ("cc" "contains the string" "@mozilla.org")