Commit de044355 authored by gerv%gerv.net's avatar gerv%gerv.net

Bug 110711 - various query.cgi/tmpl problems. This patch resolves all known issues.

parent da9f2287
...@@ -468,7 +468,7 @@ You will get this message once a day until you've dealt with these bugs! ...@@ -468,7 +468,7 @@ You will get this message once a day until you've dealt with these bugs!
DefParam("defaultquery", DefParam("defaultquery",
"This is the default query that initially comes up when you submit a bug. It's in URL parameter format, which makes it hard to read. Sorry!", "This is the default query that initially comes up when you submit a bug. It's in URL parameter format, which makes it hard to read. Sorry!",
"t", "t",
"bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&order=%22Importance%22"); "bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&emailassigned_to1=1&emailassigned_to2=1&emailreporter2=1&emailcc2=1&emailqa_contact2=1&order=%22Importance%22");
DefParam("letsubmitterchoosepriority", DefParam("letsubmitterchoosepriority",
......
...@@ -347,117 +347,110 @@ function selectProduct(f) { ...@@ -347,117 +347,110 @@ function selectProduct(f) {
</select> </select>
</td> </td>
<td> <td>
<input name="short_desc" size="30" value="[% default.short_desc.0 FILTER html %]" /> <input name="short_desc" size="40" value="[% default.short_desc.0 FILTER html %]" />
</td> </td>
<td> <td>
<input type="submit" value="Search" /> <input type="submit" value="Search" />
</td> </td>
</tr> </tr>
</table>
[%# *** Product Component Version Target *** %] [%# *** Product Component Version Target *** %]
<table>
<tr> <tr>
<td> <td colspan="4">
<table> <table>
<tr valign="bottom"> <tr valign="bottom">
<th align="left">Product:</th> <th align="left">Product:</th>
<th align="left"><a href="describecomponents.cgi">Component</a>:</th> <th align="left"><a href="describecomponents.cgi">Component</a>:</th>
<th align="left">Version:</th> <th align="left">Version:</th>
[% IF (Param("usetargetmilestone")) %] [% IF (Param("usetargetmilestone")) %]
<th align="left">Target:</th> <th align="left">Target:</th>
[% END %] [% END %]
</tr> </tr>
<tr valign="top"> <tr valign="top">
[%# Can't use the select block here because of onChange and the fact that [%# Can't use the select block here because of onChange and the fact that
'component' is a toolkit reserved word - we use 'component_' instead. %] 'component' is a toolkit reserved word - we use 'component_' instead. %]
<td align="left"> <td align="left">
<select name="product" multiple size="5" onChange="selectProduct(this.form);"> <select name="product" multiple size="5" onChange="selectProduct(this.form);">
[% FOREACH p = product %] [% FOREACH p = product %]
<option value="[% p FILTER html %]" <option value="[% p FILTER html %]"
[% " selected" IF lsearch(default.product, p) != -1 %]> [% " selected" IF lsearch(default.product, p) != -1 %]>
[% p FILTER html %]</option> [% p FILTER html %]</option>
[% END %] [% END %]
</select> </select>
</td> </td>
<td align="left"> <td align="left">
<select name="component" multiple size="5"> <select name="component" multiple size="5">
[% FOREACH c = component_ %] [% FOREACH c = component_ %]
<option value="[% c FILTER html %]" <option value="[% c FILTER html %]"
[% " selected" IF lsearch(default.component, c) != -1 %]> [% " selected" IF lsearch(default.component, c) != -1 %]>
[% c FILTER html %]</option> [% c FILTER html %]</option>
[% END %] [% END %]
</select> </select>
</td> </td>
[% PROCESS select sel = { name => 'version', size => 5 } %] [% PROCESS select sel = { name => 'version', size => 5 } %]
[% IF target_milestone.size > 0 %] [% IF target_milestone.size > 0 %]
[% PROCESS select sel = { name => 'target_milestone', size => 5 } %] [% PROCESS select sel = { name => 'target_milestone', size => 5 } %]
[% END %] [% END %]
</tr> </tr>
</table> </table>
</td> </td>
</tr> </tr>
[%# *** Comment URL Whiteboard Keywords *** %] [%# *** Comment URL Whiteboard Keywords *** %]
<tr> [% FOREACH field = [
<td> { name => "long_desc", description => "A&nbsp;comment" },
<table border="0"> { name => "bug_file_loc", description => "The&nbsp;URL" },
[% FOREACH field = [ { name => "status_whiteboard", description => "Whiteboard" } ] %]
{ name => "long_desc", description => "A comment" },
{ name => "bug_file_loc", description => "The URL" },
{ name => "status_whiteboard", description => "Whiteboard" } ] %]
[% UNLESS field.name == 'status_whiteboard' AND NOT Param('usestatuswhiteboard') %]
<tr>
<th align="right">[% field.description %]:</th>
<td>
<select name="[% field.name %]_type">
[% FOREACH qv = query_variants %]
[% type = "${field.name}_type" %]
<option value="[% qv.value %]"
[% " selected" IF default.$type.0 == qv.value %]>[% qv.description %]</option>
[% END %]
</select>
</td>
<td><input name="[% field.name %]" size="40" value="
[% default.${field.name}.0 FILTER html %]" /></td>
</tr>
[% END %]
[% END %]
[% IF have_keywords %] [% UNLESS field.name == 'status_whiteboard' AND NOT Param('usestatuswhiteboard') %]
<tr> <tr>
<th align="right"><a href="describekeywords.cgi">Keywords</a>:</th> <th align="right">[% field.description %]:</th>
<td> <td>
<select name="keywords_type"> <select name="[% field.name %]_type">
[% FOREACH qv = [ [% FOREACH qv = query_variants %]
{ name => "anywords", description => "contains any of the keywords" }, [% type = "${field.name}_type" %]
{ name => "allwords", description => "contains all of the keywords" }, <option value="[% qv.value %]"
{ name => "nowords", description => "contains none of the keywords" } ] %] [% " selected" IF default.$type.0 == qv.value %]>[% qv.description %]</option>
[% END %]
<option value="[% qv.name %]" </select>
[% " selected" IF default.keywords_type.0 == qv.name %]> </td>
[% qv.description %]</option> <td><input name="[% field.name %]" size="40" value="
[% END %] [% default.${field.name}.0 FILTER html %]" />
</select> </td>
</td> <td></td>
<td> </tr>
<input name="keywords" size="40" value="[% default.keywords.0 FILTER html %]" />
</td>
</tr>
[% END %] [% END %]
[% END %]
</table> [% IF have_keywords %]
</td> <tr>
</tr> <th align="right"><a href="describekeywords.cgi">Keywords</a>:</th>
<td>
<select name="keywords_type">
[% FOREACH qv = [
{ name => "anywords", description => "contains any of the keywords" },
{ name => "allwords", description => "contains all of the keywords" },
{ name => "nowords", description => "contains none of the keywords" } ] %]
<option value="[% qv.name %]"
[% " selected" IF default.keywords_type.0 == qv.name %]>
[% qv.description %]</option>
[% END %]
</select>
</td>
<td>
<input name="keywords" size="40" value="[% default.keywords.0 FILTER html %]" />
</td>
</tr>
[% END %]
</table> </table>
<hr> <hr>
...@@ -498,6 +491,7 @@ function selectProduct(f) { ...@@ -498,6 +491,7 @@ function selectProduct(f) {
</strong> </strong>
</legend> </legend>
<table> <table>
<tr> <tr>
[% FOREACH n = [1, 2] %] [% FOREACH n = [1, 2] %]
...@@ -511,33 +505,63 @@ function selectProduct(f) { ...@@ -511,33 +505,63 @@ function selectProduct(f) {
</td> </td>
</tr> </tr>
<tr> <tr>
<td><input type="checkbox" name="emailassigned_to[% n %]" value="1" <td>
[% " checked" IF default.emailassigned_to.$n %] />bug owner</td> <input type="checkbox" name="emailassigned_to[% n %]"
id="emailassigned_to[% n %]" value="1"
[% " checked" IF default.emailassigned_to.$n %] />
<label for="emailassigned_to[% n %]">
bug owner
</label>
</td>
</tr> </tr>
<tr> <tr>
<td><input type="checkbox" name="emailreporter[% n %]" value="1" <td>
[% " checked" IF default.emailreporter.$n %] />reporter</td> <input type="checkbox" name="emailreporter[% n %]"
id="emailreporter[% n %]" value="1"
[% " checked" IF default.emailreporter.$n %] />
<label for="emailreporter[% n %]">
reporter
</label>
</td>
</tr> </tr>
[% IF Param('useqacontact') %] [% IF Param('useqacontact') %]
<tr> <tr>
<td><input type="checkbox" name="emailqa_contact[% n %]" value="1" <td>
[% " checked" IF default.emailqa_contact.$n %] />QA Contact</td> <input type="checkbox" name="emailqa_contact[% n %]"
id="emailqa_contact[% n %]" value="1"
[% " checked" IF default.emailqa_contact.$n %] />
<label for="emailqa_contact[% n %]">
QA contact
</label>
</td>
</tr> </tr>
[% END %] [% END %]
<tr> <tr>
<td><input type="checkbox" name="emailcc[% n %]" value="1" <td>
[% " checked" IF default.emailcc.$n %] />CC list member</td> <input type="checkbox" name="emailcc[% n %]"
id="emailcc[% n %]" value="1"
[% " checked" IF default.emailcc.$n %] />
<label for="emailcc[% n %]">
CC list member
</label>
</td>
</tr> </tr>
<tr> <tr>
<td><input type="checkbox" name="emaillongdesc[% n %]" value="1" <td>
[% " checked" IF default.emaillongdesc.$n %] />commenter</td> <input type="checkbox" name="emaillongdesc[% n %]"
id="emaillongdesc[% n %]" value="1"
[% " checked" IF default.emaillongdesc.$n %] />
<label for="emaillongdesc[% n %]">
commenter
</label>
</td>
</tr> </tr>
<tr> <tr>
<td> <td>
<select name="emailtype[% n %]"> <select name="emailtype[% n %]">
[% FOREACH qv = [ [% FOREACH qv = [
{ name => "exact", description => "is" },
{ name => "substring", description => "contains" }, { name => "substring", description => "contains" },
{ name => "exact", description => "is" },
{ name => "regexp", description => "matches regexp" }, { name => "regexp", description => "matches regexp" },
{ name => "notregexp", description => "doesn&#8217;t match regexp" } ] %] { name => "notregexp", description => "doesn&#8217;t match regexp" } ] %]
...@@ -587,6 +611,7 @@ function selectProduct(f) { ...@@ -587,6 +611,7 @@ function selectProduct(f) {
</tr> </tr>
</table> </table>
</fieldset> </fieldset>
</td> </td>
...@@ -596,6 +621,7 @@ function selectProduct(f) { ...@@ -596,6 +621,7 @@ function selectProduct(f) {
<fieldset> <fieldset>
<legend><strong>Bug Changes</strong></legend> <legend><strong>Bug Changes</strong></legend>
<dl> <dl>
<dt>Only bugs changed in the last </dt> <dt>Only bugs changed in the last </dt>
<dd><input name=changedin size=3 value="[% default.changedin.0 FILTER html %]" /> days</dd> <dd><input name=changedin size=3 value="[% default.changedin.0 FILTER html %]" /> days</dd>
...@@ -617,7 +643,7 @@ function selectProduct(f) { ...@@ -617,7 +643,7 @@ function selectProduct(f) {
<dd> <dd>
<input name="chfieldfrom" size="10" value="[% default.chfieldfrom.0 FILTER html %]" /> <input name="chfieldfrom" size="10" value="[% default.chfieldfrom.0 FILTER html %]" />
and <input name="chfieldto" size="10" value="[% default.chfieldto.0 FILTER html %]" /> and <input name="chfieldto" size="10" value="[% default.chfieldto.0 FILTER html %]" />
<br>(YYYY-MM-DD) <br />(YYYY-MM-DD)
</dd> </dd>
<dt>to this value: (optional)</dt> <dt>to this value: (optional)</dt>
<dd> <dd>
...@@ -625,6 +651,7 @@ function selectProduct(f) { ...@@ -625,6 +651,7 @@ function selectProduct(f) {
</dd> </dd>
</dl> </dl>
</fieldset> </fieldset>
</td> </td>
</tr> </tr>
...@@ -637,9 +664,9 @@ function selectProduct(f) { ...@@ -637,9 +664,9 @@ function selectProduct(f) {
[% IF NOT userid %] [% IF NOT userid %]
<input type="hidden" name="cmdtype" value="doit" /> <input type="hidden" name="cmdtype" value="doit" />
[% ELSE %] [% ELSE %]
<br> <br />
<input type="radio" name="cmdtype" value="doit" checked /> Run this query <input type="radio" name="cmdtype" value="doit" checked /> Run this query
<br> <br />
[% IF namedqueries.size > 0 %] [% IF namedqueries.size > 0 %]
<p> <p>
...@@ -675,15 +702,16 @@ function selectProduct(f) { ...@@ -675,15 +702,16 @@ function selectProduct(f) {
<input type="radio" name="cmdtype" value="asdefault" /> <input type="radio" name="cmdtype" value="asdefault" />
Remember this as my default query Remember this as my default query
<br> <br />
<input type="radio" name="cmdtype" value="asnamed" /> <input type="radio" name="cmdtype" value="asnamed" />
Remember this query, and name it: Remember this query, and name it:
<input type="text" name="newqueryname"> <input type="text" name="newqueryname">
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" name="tofooter" value="1" /> <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" name="tofooter" value="1" />
and put it in my page footer and put it in my page footer
<br> <br />
[% END %] [% END %]
<p> <br />
<div>
Sort results by: Sort results by:
<select name="order"> <select name="order">
[% FOREACH order = orders %] [% FOREACH order = orders %]
...@@ -692,14 +720,14 @@ function selectProduct(f) { ...@@ -692,14 +720,14 @@ function selectProduct(f) {
[% END %] [% END %]
</select> </select>
<input type="submit" value="Submit query" /> <input type="submit" value="Search" />
[% IF userdefaultquery %] [% IF userdefaultquery %]
<p> <p>
<a href="query.cgi?nukedefaultquery=1"> <a href="query.cgi?nukedefaultquery=1">
Set my default query back to the system default</a> Set my default query back to the system default</a>
</p> </p>
[% END %] [% END %]
</p> </div>
</td> </td>
</tr> </tr>
</table> </table>
......
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