diff options
author | gerv%gerv.net <> | 2002-08-10 18:53:29 +0200 |
---|---|---|
committer | gerv%gerv.net <> | 2002-08-10 18:53:29 +0200 |
commit | a52f0b4135b629b9651145ad51bc2791b7feaeac (patch) | |
tree | da80765868d51a7280af95db2e523ac6937b62ff /template/en/default/reports | |
parent | df1948548c8c5bc6e9c55ef4dbd5f7fd4ac10aeb (diff) | |
download | bugzilla-a52f0b4135b629b9651145ad51bc2791b7feaeac.tar.gz bugzilla-a52f0b4135b629b9651145ad51bc2791b7feaeac.tar.xz |
Bug 155584 - Opening duplicates.cgi with no frequent bugs causes SQL syntax error. Patch by gerv; r=bbaetz.
Diffstat (limited to 'template/en/default/reports')
-rw-r--r-- | template/en/default/reports/duplicates-table.html.tmpl | 176 | ||||
-rw-r--r-- | template/en/default/reports/duplicates.html.tmpl | 3 |
2 files changed, 90 insertions, 89 deletions
diff --git a/template/en/default/reports/duplicates-table.html.tmpl b/template/en/default/reports/duplicates-table.html.tmpl index 83499b377..ae9f074a9 100644 --- a/template/en/default/reports/duplicates-table.html.tmpl +++ b/template/en/default/reports/duplicates-table.html.tmpl @@ -44,100 +44,104 @@ [%# *** Column Headers *** %] -<table border> - <tr bgcolor="#CCCCCC"> - [% FOREACH column = [ { name => "id", description => "Bug #" }, - { name => "count", description => "Dupe<br>Count" }, - { name => "delta", - description => "Change in last<br>$changedsince day(s)" }, - { name => "component", description => "Component" }, - { name => "bug_severity", description => "Severity" }, - { name => "op_sys", description => "Op Sys" }, - { name => "target_milestone", - description => "Target<br>Milestone" }, - { name => "short_desc", description => "Summary" } ] - %] - - [%# Small hack to keep delta column out if we don't need it %] - [% NEXT IF column.name == "delta" AND NOT dobefore %] +[% IF bug_ids.size > 0 %] + <table border> + <tr bgcolor="#CCCCCC"> + [% FOREACH column = [ { name => "id", description => "Bug #" }, + { name => "count", description => "Dupe<br>Count" }, + { name => "delta", + description => "Change in last<br>$changedsince day(s)" }, + { name => "component", description => "Component" }, + { name => "bug_severity", description => "Severity" }, + { name => "op_sys", description => "Op Sys" }, + { name => "target_milestone", + description => "Target<br>Milestone" }, + { name => "short_desc", description => "Summary" } ] + %] - <td> - <center> - <b> - [% bug_ids_string = bug_ids.join(',') %] - <a href="duplicates.cgi?sortby=[% column.name %] - [% IF sortby == column.name %] - [% "&reverse=1" IF NOT reverse %] - [% ELSE %] - [%-# Some columns start off reversed %] - [% "&reverse=1" IF column.name.match('delta|count') %] - [% END %] - [% "&maxrows=$maxrows" IF maxrows %] - [% "&changedsince=$changedsince" IF changedsince %] - [% "&openonly=1" IF openonly %] - [% "&product=$product" IF product %] - [% "&format=$format" IF format %] - [% "&bug_id=$bug_ids_string&sortvisible=1" IF sortvisible %]"> - [% column.description %]</a> - </b> - </center> - </td> - [% END %] - </tr> - -[% IF NOT sortby %] - [% sortby = "count"; reverse = "1" %] -[% END %] + [%# Small hack to keep delta column out if we don't need it %] + [% NEXT IF column.name == "delta" AND NOT dobefore %] -[% IF sortby == "id" OR sortby == "count" OR sortby == "delta" %] - [%# Numeric sort %] - [% sortedbugs = bugs.nsort(sortby) %] -[% ELSE %] - [% sortedbugs = bugs.sort(sortby) %] -[% END %] + <td> + <center> + <b> + [% bug_ids_string = bug_ids.join(',') %] + <a href="duplicates.cgi?sortby=[% column.name %] + [% IF sortby == column.name %] + [% "&reverse=1" IF NOT reverse %] + [% ELSE %] + [%-# Some columns start off reversed %] + [% "&reverse=1" IF column.name.match('delta|count') %] + [% END %] + [% "&maxrows=$maxrows" IF maxrows %] + [% "&changedsince=$changedsince" IF changedsince %] + [% "&openonly=1" IF openonly %] + [% "&product=$product" IF product %] + [% "&format=$format" IF format %] + [% "&bug_id=$bug_ids_string&sortvisible=1" IF sortvisible %]"> + [% column.description %]</a> + </b> + </center> + </td> + [% END %] + </tr> -[% IF reverse %] - [% bugs = sortedbugs.reverse %] -[% ELSE %] - [% bugs = sortedbugs %] -[% END %] + [% IF NOT sortby %] + [% sortby = "count"; reverse = "1" %] + [% END %] -[%# *** Buglist *** %] + [% IF sortby == "id" OR sortby == "count" OR sortby == "delta" %] + [%# Numeric sort %] + [% sortedbugs = bugs.nsort(sortby) %] + [% ELSE %] + [% sortedbugs = bugs.sort(sortby) %] + [% END %] -[%# We need to keep track of the bug IDs we are actually displaying, because - # if the user decides to sort the visible list, we need to know what that - # list actually is. %] -[% vis_bug_ids = [] %] + [% IF reverse %] + [% bugs = sortedbugs.reverse %] + [% ELSE %] + [% bugs = sortedbugs %] + [% END %] -[% FOREACH bug = bugs %] - [% LAST IF loop.index() >= maxrows %] - [% vis_bug_ids.push(bug.id) %] + [%# *** Buglist *** %] - <tr> - <td> - <center> - [% "<strike>" IF bug.resolution != "" %] - <a href="show_bug.cgi?id=[% bug.id %]">[% bug.id %]</a> - [% "</strike>" IF bug.resolution != "" %] - </center> - </td> + [%# We need to keep track of the bug IDs we are actually displaying, because + # if the user decides to sort the visible list, we need to know what that + # list actually is. %] + [% vis_bug_ids = [] %] - <td> - <center> - [% bug.count %] - </center> - </td> + [% FOREACH bug = bugs %] + [% LAST IF loop.index() >= maxrows %] + [% vis_bug_ids.push(bug.id) %] - [% IF dobefore %] - <td><center>[% bug.delta %]</center></td> - [% END %] + <tr> + <td> + <center> + [% "<strike>" IF bug.resolution != "" %] + <a href="show_bug.cgi?id=[% bug.id %]">[% bug.id %]</a> + [% "</strike>" IF bug.resolution != "" %] + </center> + </td> - <td>[% bug.component %]</td> - <td><center>[% bug.bug_severity %]</center></td> - <td><center>[% bug.op_sys %]</center></td> - <td><center>[% bug.target_milestone %]</center></td> - <td>[% bug.short_desc FILTER html %]</td> - </tr> -[% END %] + <td> + <center> + [% bug.count %] + </center> + </td> + + [% IF dobefore %] + <td><center>[% bug.delta %]</center></td> + [% END %] + + <td>[% bug.component %]</td> + <td><center>[% bug.bug_severity %]</center></td> + <td><center>[% bug.op_sys %]</center></td> + <td><center>[% bug.target_milestone %]</center></td> + <td>[% bug.short_desc FILTER html %]</td> + </tr> + [% END %] -</table> + </table> +[% ELSE %] + <h3>No duplicate bugs found.</h3> +[% END %] diff --git a/template/en/default/reports/duplicates.html.tmpl b/template/en/default/reports/duplicates.html.tmpl index 64ba5e120..531196eb8 100644 --- a/template/en/default/reports/duplicates.html.tmpl +++ b/template/en/default/reports/duplicates.html.tmpl @@ -49,9 +49,6 @@ [% PROCESS "reports/duplicates-table.html.tmpl" %] -<br> -<br> - [%# *** Parameters *** %] [% bug_ids_string = vis_bug_ids.join(',') %] |