Thunderbird:Testing/Workshops/Duplication/doc

From MozillaWiki
Jump to: navigation, search

Bugzilla statistics say that 40% of bugs are duplicates. A big part of keeping the Bugzilla database manageable is finding and eliminating duplicate bugs. This is not as easy as it seems.

This page provides some suggestions for finding duplicate bugs. It is based on seminars given by the Thunderbird QA lead in December 2010. The suggestions are mostly tips on using various search interfaces to the Bugzilla database and constructing effective searches.

To find duplicate bugs, start by selecting a bug and carefully reading its bug report. Try to find keywords that would describe the bug and enable it to be logically grouped. Ask yourself if it is an enhancement request that seems like it would be obvious and popular (in which case it is probably already in the bug database).

Get to know the "Duptomes"

There are a group of bugs that get frequently entered (and thus duplicated):

Duptome bugzilla query

Some of these bugs have the resolution of "INVALID" or "WONTFIX", and sometimes we mark new bugs as duplicates of these closed bugs.

Check meta tracking bugs

"Meta" (also known as "tracking") bugs are used to group duplicate (or closely related) bugs under an umbrella bug. For example, bug # 541349 is a bug that "contains" a group of bugs related to global search results.

To see a list of meta bugs, visit https://bugzilla.mozilla.org/buglist.cgi?keywords=meta&keywords_type=allwords&resolution=---&resolution=DUPLICATE&classification=Client%20Software&classification=Components&query_format=advanced&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&product=MailNews%20Core&product=Thunderbird

Search through the list to see if any are relevant to your bug. If you find one that seems relevant, view the bug report and click "Show dependency tree". In the list of bugs, look for one that matches the one you are working on. If you can make a match, mark your bug as a duplicate of the one you found in the dependency tree.

Using meta bugs to search for duplicates is relatively fast and easy. However, not all bugs are covered by meta bugs, and not all meta bugs list every relevant bug.

Use quicksearch permutations

"Quicksearch" is an alternative search interface to the Bugzilla database. It makes it easy to construct complex search queries that execute quickly. Visit http://www.squarefree.com/bugzilla/quicksearch-help.html to access the interface and read the instructions.

In general, you will usually find it most useful to search for keywords related to your bug. Some tips:

  • Add ":thunderbird" to the query to restrain your search to the Thunderbird product. This is particularly useful when the list returned by your quicksearch is too long. However, remember that your bug might also be in the "MailNews Core" and not just Thunderbird.
  • To shorten the list of bugs:
    • a) restrict the search to closed or open bugs. (If you are using the latest Thunderbird release you may know whether the duplicate bug is open or closed.)
    • b) look at only "ENH" or only "-ENH" bugs (enhancements or non-enhancements).
  • If you don't find anything using the keywords that you've derived from the bug's description, try permutations of the keywords. Especially, use a shorter string from a keyword in order to match more permutations. For example:
    1. use "crash" instead of "crashing", "crashed", "crashes"
    2. use "repl" to find "replied", "reply", "replies"
  • Try synonyms. For example, the word "answer" might be synonymous with "reply"; the word "configure" might be synonymous with "set"; the word "email" might be synonymous with "message".

Bugzilla's Advanced search

Bugzilla's advanced search (https://bugzilla.mozilla.org/query.cgi) has a little more capability than the Quicksearch, and in some cases is easier to use. This is especially true if you are constructing a complex query that you need to run and alter several times. Bugzilla's advanced search interface is more visual and easier to alter than a long complex search string displayed in text. However, some of the idiosyncrasies of the interface and the Bugzilla database take some time and experience to understand.

When searching for terms and keywords, it is generally best to search in the "Summary" field rather than the "Keywords" or other fields. This is because people entering bugs often don't specify keywords, but use relevant keywords in the bug summary.

Some tips on searching for terms in a bug's subject:

  • Take one or two words from the subject that you're searching for and enter them in the "Subject" field in the Advanced Search interface.
  • For Thunderbird bugs, unless the bug is in "core" code (that is, shared with Firefox), it will typically be in the "Thunderbird" or "MailNews Core" product. Select these values in the Product field.

If you don't find anything relevant, try refining your keywords:

  • As an example, in the address book, mailing lists could be called "mail list", "mailing list" or even "groups". Don't forget to think about what users call things, what developers call things, and what the official product names are for things.
  • "Email address" also has various of permutations, such as "Email", "Address", "Addresses". (In this case searching for "Address" should be enough.)
  • Think about shortening words. For example, you may be talking about "newsgroups" but others may simply talk about "news". Likewise with "server" and "service" - a quicker way to a result may be to search for "serv".


Set search defaults and URL query

To make Bugzilla's Advanced search easier to use, you can set search query defaults as follows:

  1. Go to https://bugzilla.mozilla.org/query.cgi?format=advanced.
  2. In the Products field, select "Thunderbird" and "Mailnews Core"(most bugs will be there).
  3. In Boolean Charts section at the bottom of the page:
    • Make the first item be "Summary" // "contains any of the strings"
    • Click OR to add a new set of fields
    • Make the second item be "Summary" // "contains the string" (specify "Keyword" instead of "Summary" if you want to search for a term in the Keyword field)
    • Click "Add another boolean chart"
    • Enter additional field / match pairs as desired
  4. click "Search" with no search criteria. After 2-3 seconds, cancel the search (so you don't wait for several minutes to pull up a huge page of irrelevant bugs)

The configuration entered above will now be your default configuration whenever you go to https://bugzilla.mozilla.org/query.cgi?format=advanced. You will only need to tweak the search parameters to perform searches.

Next, create a browser bookmark with the location https://bugzilla.mozilla.org/buglist.cgi?query_format=advanced;short_desc_type=substring;resolution=---;type0-0-0=nowords;value0-0-0=count%20counts;product=MailNews%20Core;product=Thunderbird;short_desc=%s. Assign the keyword of "bugstb". (Firefox supports bookmark keywords; other browsers may not.)

In your browser's URL field, enter the bookmark's keyword followed by two words that you want to search in the bug's Summary field:

 bugstb  string1 string2

Quick filter in Thunderbird

Your Bugzilla account can be configured to send you emails under a variety of circumstances. You may be able to use Thunderbird to search your bug emails to find duplicates. This is generally only useful if you have a large number of Bugzilla emails that span a considerable period of time.

Search change feed in news reader

When developers check in changes to the source code repository, they include the related bug in the description of the change. If you subscribe to the RSS feed for source code changes (at https://hg.mozilla.org/comm-central/atom-log), you can your news reader's search tools to search the change descriptions. Similar to the method described above, this method works best if you have an accumulated body of messages.