<!-- 1.0@bugzilla.org -->
[%# The contents of this file are subject to the Mozilla Public
  # License Version 1.1 (the "License"); you may not use this file
  # except in compliance with the License. You may obtain a copy of
  # the License at http://www.mozilla.org/MPL/
  #
  # Software distributed under the License is distributed on an "AS
  # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
  # implied. See the License for the specific language governing
  # rights and limitations under the License.
  #
  # The Original Code is the Bugzilla Bug Tracking System.
  #
  # The Initial Developer of the Original Code is Netscape Communications
  # Corporation. Portions created by Netscape are
  # Copyright (C) 1998 Netscape Communications Corporation. All
  # Rights Reserved.
  #
  # Contributor(s): Gervase Markham <gerv@gerv.net>
  #%]

[%# INTERFACE:
  # products: list of strings. The products this user can see.
  #  
  # sortby: string. the column on which we are sorting the buglist.
  # reverse: boolean. True if we are reversing the current sort.
  # maxrows: integer. Max number of rows to display.
  # changedsince: integer. The number of days ago for the changedsince column.
  # openonly: boolean. True if we are only showing open bugs.    
  # product: string. Restrict to this product only.
  #
  # Additionally, you need to fulfill the interface to
  # duplicates-table.html.tmpl.
  #%]
 
[% IF product %]
  [% title = "Most Frequently Reported Bugs for $product" %]
[% ELSE %]   
  [% title = "Most Frequently Reported Bugs" %]
[% END%]

[% PROCESS global/header.html.tmpl 
   style = ".resolved { background-color: #d9d9d9; color: #000000; }"
%]

<p>
  <a href="#explanation">What is this data?</a>
  <br>
  <a href="#params">Change parameters</a>
</p>

[% PROCESS "reports/duplicates-table.html.tmpl" %]

[%# *** Parameters *** %]

[% bug_ids_string = vis_bug_ids.join(',') %]

<h3><a name="params">Change Parameters</a></h3>

<form method="get" action="duplicates.cgi">
  <input type="hidden" name="sortby" value="[% sortby FILTER html %]">
  <input type="hidden" name="reverse" value="[% reverse %]">
  <input type="hidden" name="bug_id" value="[% bug_ids_string %]">
  <table>
    <tr>
      <td>When sorting or restricting,
          work with:</td>
      <td>
        <input type="radio" name="sortvisible" id="entirelist" value="0" 
          [% "checked" IF NOT sortvisible %]>         
        <label for="entirelist">
          entire list
        </label>
        <br>        
        <input type="radio" name="sortvisible" id="visiblelist" value="1" 
          [% "checked" IF sortvisible %]> 
        <label for="visiblelist">
          currently visible list
        </label>
      </td>
      <td rowspan="4" valign="top">Restrict to products:</td>
      <td rowspan="4" valign="top">
        <select name="product" size="5" multiple="multiple">
          [% FOREACH p = products %]
            <option name="[% p FILTER html %]"
            [% " selected" IF product == p %]>[% p FILTER html %]</option>
          [% END %]
        </select>
      </td>
     </tr>

    <tr>
      <td>Max rows:</td>
      <td>
        <input size="4" name="maxrows" value="[% maxrows %]">
      </td>
    </tr>

    <tr>
      <td>Change column is change in the last:</td>
      <td>
        <input size="4" name="changedsince" value="[% changedsince %]"> days
      </td>
    </tr>

    <tr>
      <td>
        <label for="openonly">
          Open bugs only:
        </label>
      </td>
      <td>
        <input type="checkbox" name="openonly" id="openonly" value="1" 
          [% "checked" IF openonly %]>      
      </td>
    </tr>

  </table>

  <input type="submit" value="Change"> 
</form>

<form method="post" action="buglist.cgi">
  <input type="hidden" name="bug_id" value="[% bug_ids_string %]">
  <input type="hidden" name="order" value="Reuse same sort as last time">
  Or just give this to me as a <input type="submit" value="bug list">. 
  (Note: the order may not be the same.)
</form>

<hr>

<b>
  <a name="explanation">What are "Most Frequently Reported Bugs"?</a>
</b>

<blockquote>
  The Most Frequent Bugs page lists the known open bugs which 
  are reported most frequently. It is 
  automatically generated from the Bugzilla database every 24 hours, by 
  counting the number of direct and indirect duplicates of bugs.
  This information is provided in order to assist in minimizing
  the amount of duplicate bugs entered into Bugzilla, which saves time
  for Quality Assurance engineers who have to triage the bugs.
</blockquote>

<b>How do I use this list?</b>

<ul>
  <li>Review the most frequent bugs list.</li>
  <li>If your problem is listed:</li>

  <ul>
    <li>Click on the bug number to confirm that you have found the same bug, 
        and comment if you have additional information or move on with your 
        testing of the product.
    </li>
  </ul>

  <li>If your problem not listed:</li>

  <ul>
    <li><a href="query.cgi">Try and locate a similar bug</a> 
        that has already been filed.</li>
    <li>If you find your bug in Bugzilla, feel free to comment with any new or
        additional data you may have.</li>
    <li>If you cannot find your problem already documented in Bugzilla, 
        <a href="enter_bug.cgi">file a new bug</a>.</li>
  </ul>
</ul>

[% PROCESS global/footer.html.tmpl %]
