Commit c97950ad authored by Gervase Markham's avatar Gervase Markham

Bug 1107315 - Update Boolean Charts documentation to match new UI. r=mcote, a=glob.

parent 4e15a133
...@@ -33,10 +33,6 @@ would search only in that product. ...@@ -33,10 +33,6 @@ would search only in that product.
You can also use it to go directly to a bug by entering its number or its You can also use it to go directly to a bug by entering its number or its
alias. alias.
.. todo:: Need to incorporate the full reference, and link it properly from
the GUI. https://bugzilla.mozilla.org/page.cgi?id=quicksearch.html
Turn this item into a bug after checkin.
Simple Search Simple Search
============= =============
...@@ -66,15 +62,15 @@ with other users; see :ref:`saved-searches` for more details. ...@@ -66,15 +62,15 @@ with other users; see :ref:`saved-searches` for more details.
Custom Search Custom Search
============= =============
Highly advanced querying is done using the Custom Search feature of the Highly advanced querying is done using the :guilabel:`Custom Search` feature
Advanced Search page. of the :guilabel:`Advanced Search` page.
The search criteria here further restrict the set of results The search criteria here further restrict the set of results
returned by a query over and above those defined in the fields at the top returned by a query, over and above those defined in the fields at the top
of the page. It is thereby possible to search for bugs of the page. It is thereby possible to search for bugs
based on elaborate combinations of criteria. based on elaborate combinations of criteria.
The simplest boolean searches have only one term. These searches The simplest custom searches have only one term. These searches
permit the selected *field* permit the selected *field*
to be compared using a to be compared using a
selectable *operator* to a selectable *operator* to a
...@@ -83,10 +79,10 @@ fields. However, you can then combine terms using "Match ANY" or "Match ALL", ...@@ -83,10 +79,10 @@ fields. However, you can then combine terms using "Match ANY" or "Match ALL",
using parentheses for combining and priority, in order to construct searches using parentheses for combining and priority, in order to construct searches
of almost arbitrary complexity. of almost arbitrary complexity.
There are three fields in each row of a boolean search. There are three fields in each row (known as a "term") of a custom search:
- *Field:* - *Field:*
the items being searched the name of the field being searched
- *Operator:* - *Operator:*
the comparison operator the comparison operator
...@@ -94,71 +90,87 @@ There are three fields in each row of a boolean search. ...@@ -94,71 +90,87 @@ There are three fields in each row of a boolean search.
- *Value:* - *Value:*
the value to which the field is being compared the value to which the field is being compared
.. _negation: The list of available *fields* contains all the fields defined for a bug,
including any custom fields, and then also some pseudofields like
.. _multiplecharts: :guilabel:`Assignee Real Name`, :guilabel:`Days Since Bug Changed`,
:guilabel:`Time Since Assignee Touched` and other things it may be useful to
Multiple Charts search on.
---------------
There are a wide range of *operators* available, not all of which may make
.. todo:: This needs rewriting for the new UI. sense for a particular field. There are various string-matching operations
Turn this item into a bug after checkin. (including regular expressions), numerical comparisons (which also work for
dates), and also the ability to search for change information—when a field
The terms within a single row of a boolean chart are all changed, what it changed from or to, and who did it. There are special
constraints on a single piece of data. If you are looking for operators for :guilabel:`is empty` and :guilabel:`is not empty`, because
a bug that has two different people cc'd on it, then you need Bugzilla can't tell the difference between a value field left blank on
to use two boolean charts. A search for purpose and one left blank by accident.
("cc" "contains the string" "foo@") AND You can have an arbitrary number of rows, and the dropdown box above them
("cc" "contains the string" "@mozilla.org") defines how they relate—:guilabel:`Match ALL of the following separately`,
:guilabel:`Match ANY of the following separately`, or :guilabel:`Match ALL of
would return only bugs with "foo@mozilla.org" on the cc list. the following against the same field`. The difference between the first and
If you wanted bugs where there is someone on the cc list the third can be illustrated with a comment search. If you have a search::
containing "foo@" and someone else containing "@mozilla.org",
then you would need two boolean charts. Comment contains the string "Fred"
Comment contains the string "Barney"
First chart: ("cc" "contains the string" "foo@")
Second chart: ("cc" "contains the string" "@mozilla.org") then under the first regime (match separately) the search would return bugs
where "Fred" appeared in one comment and "Barney" in the same or any other
The bugs listed will be only the bugs where ALL the charts are true. comment, whereas under the second (match against the same field), both strings
would need to occur in exactly the same comment.
.. _advanced-features:
Advanced Features
-----------------
If you click :guilabel:`Show Advanced Features`, then more capabilities appear.
You can negate any row with a checkbox (see below) and also group lines of the
search with parentheses to determine how different search terms relate. Within
each bracketed set, you get the choice of combining them using ALL (i.e. AND)
or ANY (i.e. OR).
Negation Negation
-------- --------
At first glance, negation seems redundant. Rather than At first glance, negation seems redundant. Rather than
searching for searching for::
NOT("summary" "contains the string" "foo"), NOT ( summary contains the string "foo" )
one could search for one could search for::
("summary" "does not contain the string" "foo"). summary does not contain the string "foo"
However, the search However, the search::
("CC" "does not contain the string" "@mozilla.org") CC does not contain the string "@mozilla.org"
would find every bug where anyone on the CC list did not contain would find every bug where anyone on the CC list did not contain
"@mozilla.org" while "@mozilla.org" while::
NOT("CC" "contains the string" "@mozilla.org") NOT ( CC contains the string "@mozilla.org" )
would find every bug where there was nobody on the CC list who would find every bug where there was nobody on the CC list who
did contain the string. Similarly, the use of negation also permits did contain the string. Similarly, the use of negation also permits
complex expressions to be built using terms OR'd together and then complex expressions to be built using terms OR'd together and then
negated. Negation permits queries such as negated. Negation permits queries such as::
NOT(("product" "equals" "update") OR NOT ( ( product equals "Update" )
("component" "equals" "Documentation")) OR
( component equals "Documentation" )
)
to find bugs that are neither to find bugs that are neither
in the update product or in the documentation component or in the :guilabel:`Update` product or in the :guilabel:`Documentation` component
or::
NOT(("commenter" "equals" "%assignee%") OR NOT ( ( commenter equals "%assignee%" )
("component" "equals" "Documentation")) OR
(component equals "Documentation" )
)
to find non-documentation to find non-documentation bugs on which the assignee has never commented.
bugs on which the assignee has never commented.
.. _pronouns: .. _pronouns:
...@@ -166,26 +178,28 @@ Pronoun Substitution ...@@ -166,26 +178,28 @@ Pronoun Substitution
-------------------- --------------------
Sometimes, a query needs to compare a user-related field Sometimes, a query needs to compare a user-related field
(such as Reporter) with a role-specific user (such as the (such as :guilabel:`Reporter`) with a role-specific user (such as the
user running the query or the user to whom each bug is assigned). For user running the query or the user to whom each bug is assigned). For
example, you may want to find all bugs which are assigned to the person example, you may want to find all bugs that are assigned to the person
who reported them. who reported them.
When the Custom Search operator is either "equals" or "notequals", the value When the :guilabel:`Custom Search` operator is either :guilabel:`equals` or
can be "%reporter%", "%assignee%", "%qacontact%", or "%user%". :guilabel:`notequals`, the value can be "%reporter%", "%assignee%",
The user pronoun "%qacontact%", or "%user%". These are known as "pronouns". The user pronoun
refers to the user who is executing the query or, in the case refers to the user who is executing the query or, in the case
of whining reports, the user who will be the recipient of whining reports, the user who will be the recipient
of the report. The reporter, assignee, and qacontact of the report. The reporter, assignee, and qacontact
pronouns refer to the corresponding fields in the bug. pronouns refer to the corresponding fields in the bug.
Boolean charts also let you type a group name in any user-related This feature also lets you search by a user's group memberships. If the
field if the operator is either "equals", "notequals" or "anyexact". operator is either :guilabel:`equals`, :guilabel:`notequals` or
This will let you query for any member belonging (or not) to the :guilabel:`anyexact`, you can search for
specified group. The group name must be entered following the whether a user belongs (or not) to the specified group. The group name must be
"%group.foo%" syntax, where "foo" is the group name. entered using "%group.foo%" syntax, where "foo" is the group name.
So if you are looking for bugs reported by any user being in the So if you are looking for bugs reported by any user being in the
"editbugs" group, then you can type "%group.editbugs%". "editbugs" group, then you can use::
reporter equals "%group.editbugs%"
.. _list: .. _list:
...@@ -242,3 +256,4 @@ Edit Search: ...@@ -242,3 +256,4 @@ Edit Search:
Remember Search As: Remember Search As:
You can give a search a name and remember it; a link will appear You can give a search a name and remember it; a link will appear
in your page footer giving you quick access to run it again later. in your page footer giving you quick access to run it again later.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment