checking in for Matty: replacing bug_status.html with unhardcoded bug_status.cgi, and making all cgis pass tests

git-svn-id: svn://10.0.0.236/branches/CUST_RES_BRANCH@105885 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
justdave%syndicomm.com
2001-10-20 18:08:52 +00:00
parent f150a1b542
commit 135c23162e
8 changed files with 149 additions and 148 deletions

View File

@@ -59,28 +59,28 @@ $::wentwrong = 'Something went wrong.';
################################################################################
# What we're editing eg ('resolution', 'Resolution', 'resolutions').
#my ($::valuetype, $::valuetypeicap, $::valuetypeplural);
($::valuetype, $::valuetypeicap, $::valuetypeplural) = ();
# What group you have to be in to edit these.
#my $::grouprestrict;
$::grouprestrict = undef;
# The name of the CGI calling the editor.
#my $::thiscgi;
$::thiscgi = undef;
# The name of the table that stores what we're editing.
#my $::tablename;
$::tablename = undef;
# The name of the table that has references to what we're editing.
# This currently doesn't support multiple references.
#my $::bugsreftablename;
$::bugsreftablename = undef;
# The full field name of the field that has references to what we're editing,
# eg 'bugs.resolution_id'.
#my $::bugsreffieldref;
$::bugsreffieldref = undef;
# The maximum number of characters allowed in the name of what we're editing.
# Get this information from the schema.
#my $::maxnamesize;
$::maxnamesize = undef;
################################################################################
# The following may be changed by the caller.
@@ -239,34 +239,35 @@ sub AdminEditor() {
confirm_login();
$::db->{Taint} = 1;
$::db->{Taint} = 1; # Silliness
unless (UserInGroup($::grouprestrict)) {
DisplayError("Sorry, you aren't a member of the $::grouprestrict group. " .
"And so, you aren't allowed to add, modify or delete $::valuetypeplural.",
"Not allowed");
exit;
DisplayError("Sorry, you aren't a member of the $::grouprestrict group. " .
"And so, you aren't allowed to add, modify or delete $::valuetypeplural.",
"Not allowed");
exit;
}
# Define the global variables and functions that will be passed to the UI
# template. Individual functions add their own values to this hash before
# sending them to the templates they process.
$vars = {
# Function for retrieving global parameters.
'Param' => \&Param,
# Function for processing global parameters that contain references
# to other global parameters.
'PerformSubsts' => \&PerformSubsts,
# Uses for links that point back to this script.
'thiscgi' => $::thiscgi,
# What we are actually editing.
'valuetype' => $::valuetype,
'valuetypeicap' => $::valuetypeicap,
# Maximum size allowed for a name of this value
'maxnamesize' => $::maxnamesize,
# Function for retrieving global parameters.
'Param' => \&Param,
# Function for processing global parameters that contain references
# to other global parameters.
'PerformSubsts' => \&PerformSubsts,
# Uses for links that point back to this script.
'thiscgi' => $::thiscgi,
# What we are actually editing.
'valuetype' => $::valuetype,
'valuetypeicap' => $::valuetypeicap,
# Maximum size allowed for a name of this value
'maxnamesize' => $::maxnamesize,
};
&$::extravarsref($vars);
@@ -282,43 +283,43 @@ sub AdminEditor() {
if ($action eq "list") {
ListScreen("");
ListScreen("");
} elsif ($action eq "add") {
CreateScreen();
CreateScreen();
} elsif ($action eq "new") {
ValidateName(\%fields);
ValidateDesc(\%fields);
&$::validaterestref(\%fields);
InsertNew(%fields);
ValidateName(\%fields);
ValidateDesc(\%fields);
&$::validaterestref(\%fields);
InsertNew(%fields);
} elsif ($action eq "edit") {
ValidateID(\%fields);
EditScreen(%fields);
ValidateID(\%fields);
EditScreen(%fields);
} elsif ($action eq "update") {
ValidateID(\%fields);
ValidateName(\%fields);
ValidateDesc(\%fields);
ValidateIsActive(\%fields);
&$::validaterestref(\%fields);
UpdateExisting(%fields);
ValidateID(\%fields);
ValidateName(\%fields);
ValidateDesc(\%fields);
ValidateIsActive(\%fields);
&$::validaterestref(\%fields);
UpdateExisting(%fields);
} elsif ($action eq "delete") {
ValidateID(\%fields);
DeleteExisting(%fields);
ValidateID(\%fields);
DeleteExisting(%fields);
} else {
print "Content-type: text/html\n\n";
ThatDoesntValidate("action");
print "Content-type: text/html\n\n";
ThatDoesntValidate("action");
}
}
@@ -348,7 +349,7 @@ sub ListScreen ($) {
$bugcount ||= 0;
push( @values, { 'id' => $id, 'name' => $name, 'description' => $description,
'isactive' => $isactive, 'bugcount' => $bugcount } );
'isactive' => $isactive, 'bugcount' => $bugcount } );
}
# Define the variables and functions that will be passed to the UI template.
@@ -545,7 +546,7 @@ sub DeleteExisting (%) {
}
if ($bugcount > 0) {
&$::deleterefsref($id);
&$::deleterefsref($id);
}
SendSQL("DELETE FROM $::tablename WHERE id = $id");

View File

@@ -160,7 +160,7 @@ print "
<TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0><TR>
<TD ALIGN=RIGHT><B>Bug#:</B></TD><TD><A HREF=\"" . Param('urlbase') . "show_bug.cgi?id=$bug{'bug_id'}\">$bug{'bug_id'}</A></TD>
<TD>&nbsp;</TD>
<TD ALIGN=RIGHT><B><A HREF=\"bug_status.html#rep_platform\">Platform:</A></B></TD>
<TD ALIGN=RIGHT><B><A HREF=\"bug_status.cgi#rep_platform\">Platform:</A></B></TD>
<TD><SELECT NAME=rep_platform>$platform_popup</SELECT></TD>
<TD>&nbsp;</TD>
<TD ALIGN=RIGHT><B>Reporter:</B></TD><TD>$bug{'reporter'}</TD>
@@ -190,21 +190,21 @@ print "
<TD ROWSPAN=4 ALIGN=RIGHT VALIGN=TOP><B>CC:</B></TD>
<TD ROWSPAN=4 VALIGN=TOP> $cc_element </TD>
</TR><TR>
<TD ALIGN=RIGHT><B><A HREF=\"bug_status.html\">Status:</A></B></TD>
<TD ALIGN=RIGHT><B><A HREF=\"bug_status.cgi\">Status:</A></B></TD>
<TD>$bug{'bug_status'}</TD>
<TD>&nbsp;</TD>
<TD ALIGN=RIGHT><B><A HREF=\"bug_status.html#priority\">Priority:</A></B></TD>
<TD ALIGN=RIGHT><B><A HREF=\"bug_status.cgi#priority\">Priority:</A></B></TD>
<TD><SELECT NAME=priority>$priority_popup</SELECT></TD>
<TD>&nbsp;</TD>
</TR><TR>
<TD ALIGN=RIGHT><B><A HREF=\"bug_status.html\">Resolution:</A></B></TD>
<TD ALIGN=RIGHT><B><A HREF=\"bug_status.cgi\">Resolution:</A></B></TD>
<TD>$bug{'resolution'}</TD>
<TD>&nbsp;</TD>
<TD ALIGN=RIGHT><B><A HREF=\"bug_status.html#severity\">Severity:</A></B></TD>
<TD ALIGN=RIGHT><B><A HREF=\"bug_status.cgi#severity\">Severity:</A></B></TD>
<TD><SELECT NAME=bug_severity>$sev_popup</SELECT></TD>
<TD>&nbsp;</TD>
</TR><TR>
<TD ALIGN=RIGHT><B><A HREF=\"bug_status.html#assigned_to\">Assigned&nbsp;To:
<TD ALIGN=RIGHT><B><A HREF=\"bug_status.cgi#assigned_to\">Assigned&nbsp;To:
</A></B></TD>
<TD>$bug{'assigned_to'}</TD>
<TD>&nbsp;</TD>";
@@ -493,7 +493,7 @@ if ($canedit || $::userid == $assignedtoid ||
my $resolution_popup = make_options(\@::settable_normal_resolution,
$bug{'resolution'});
print "<INPUT TYPE=radio NAME=knob VALUE=resolve>
Resolve bug, changing <A HREF=\"bug_status.html\">resolution</A> to
Resolve bug, changing <A HREF=\"bug_status.cgi\">resolution</A> to
<SELECT NAME=resolution
ONCHANGE=\"document.changeform.knob\[$knum\].checked=true\">
$resolution_popup</SELECT><br>\n";
@@ -517,7 +517,7 @@ if ($canedit || $::userid == $assignedtoid ||
my $assign_element = "<INPUT NAME=\"assigned_to\" SIZE=32 ONCHANGE=\"if ((this.value != ".SqlQuote($bug{'assigned_to_email'}) .") && (this.value != '')) { document.changeform.knob\[$knum\].checked=true; }\" VALUE=\"$bug{'assigned_to_email'}\">";
print "<INPUT TYPE=radio NAME=knob VALUE=reassign>
<A HREF=\"bug_status.html#assigned_to\">Reassign</A> bug to
<A HREF=\"bug_status.cgi#assigned_to\">Reassign</A> bug to
$assign_element
<br>\n";
if ($status eq $::unconfirmedstate && ($canconfirm || $canedit)) {

View File

@@ -1,34 +1,43 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
#!/usr/bonsaitools/bin/perl -wT
# -*- Mode: perl; indent-tabs-mode: nil -*-
#
# 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): Terry Weissman <terry@mozilla.org>
# Matthew Tuck <matty@chariot.net.au>
<!--
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):
use diagnostics;
use strict;
use lib ".";
Contributor(s): Terry Weissman <terry@mozilla.org>
-->
require "CGI.pl";
<TITLE>A Bug's Life Cycle</TITLE>
# Silliness
my $silly = $::queryable_resolution;
<h1 ALIGN=CENTER>A Bug's Life Cycle</h1>
ConnectToDatabase();
GetVersionTable();
The <B>status</B> and <B>resolution</B> field define and track the
print "Content-type: text/html\n\n";
PutHeader("A Bug's Life Cycle");
print qq{The <B>status</B> and <B>resolution</B> field define and track the
life cycle of a bug.
<a name="status"></a>
@@ -92,29 +101,22 @@ certain status transitions are allowed.
</DL>
<TD>
<DL>
<DT><B>FIXED</B>
<DD> A fix for this bug is checked into the tree and tested.
<DT><B>INVALID</B>
<DD> The problem described is not a bug
<DT><B>WONTFIX</B>
<DD> The problem described is a bug which will never be fixed.
<DT><B>LATER</B>
<DD> The problem described is a bug which will not be fixed in this
version of the product.
<DT><B>REMIND</B>
<DD> The problem described is a bug which will probably not be fixed in this
version of the product, but might still be.
<DT><B>DUPLICATE</B>
<DD> The problem is a duplicate of an existing bug. Marking a bug
duplicate requires the bug# of the duplicating bug and will at
least put that bug number in the description field.
<DT><B>WORKSFORME</B>
<DD> All attempts at reproducing this bug were futile, reading the
code produces no clues as to why this behavior would occur. If
more information appears later, please re-assign the bug, for
now, file it.
</DL>
<DL>};
SendSQL("SELECT name, description FROM resolutions");
while (MoreSQLData()) {
my ($name, $description) = FetchSQLData();
if (lsearch(\@::queryable_resolution, $name) != -1) {
$name = html_quote($name);
$description = html_quote($description);
print "<dt><b>$name</b>\n";
print "<dd> $description\n";
}
}
print qq{</DL>
</TABLE>
<H1>Other Fields</H1>
@@ -182,21 +184,19 @@ operating systems include:
<LI> Linux
</UL>
Note that the operating system implies the platform, but not always.
For example, Linux can run on PC and Macintosh and others.
<p>Note that the operating system implies the platform, but not always.
For example, Linux can run on PC and Macintosh and others.</p>
<h2><a name="assigned_to">Assigned To</a></h2>
This is the person in charge of resolving the bug. Every time this
field changes, the status changes to <B>NEW</B> to make it easy to see
which new bugs have appeared on a person's list.
<p>This is the person in charge of resolving the bug. Every time this
field changes, the status changes to <b>NEW</b> to make it easy to see
which new bugs have appeared on a person's list.</p>
The default status for queries is set to NEW, ASSIGNED and REOPENED. When
<p>The default status for queries is set to NEW, ASSIGNED and REOPENED. When
searching for bugs that have been resolved or verified, remember to set the
status field appropriately.
status field appropriately.</p>
<hr>
<!-- hhmts start -->
Last modified: Thu Aug 23 03:04:27 2000
<!-- hhmts end -->
</body> </html>
};
PutFooter();

View File

@@ -1475,15 +1475,15 @@ document.write(\" <input type=button value=\\\"Uncheck All\\\" onclick=\\\"SetCh
<TD ALIGN=RIGHT><B>Version:</B></TD>
<TD><SELECT NAME=version>$version_popup</SELECT></TD>
<TR>
<TD ALIGN=RIGHT><B><A HREF=\"bug_status.html#rep_platform\">Platform:</A></B></TD>
<TD ALIGN=RIGHT><B><A HREF=\"bug_status.cgi#rep_platform\">Platform:</A></B></TD>
<TD><SELECT NAME=rep_platform>$platform_popup</SELECT></TD>
<TD ALIGN=RIGHT><B><A HREF=\"bug_status.html#priority\">Priority:</A></B></TD>
<TD ALIGN=RIGHT><B><A HREF=\"bug_status.cgi#priority\">Priority:</A></B></TD>
<TD><SELECT NAME=priority>$priority_popup</SELECT></TD>
</TR>
<TR>
<TD ALIGN=RIGHT><B>Component:</B></TD>
<TD><SELECT NAME=component>$component_popup</SELECT></TD>
<TD ALIGN=RIGHT><B><A HREF=\"bug_status.html#severity\">Severity:</A></B></TD>
<TD ALIGN=RIGHT><B><A HREF=\"bug_status.cgi#severity\">Severity:</A></B></TD>
<TD><SELECT NAME=bug_severity>$sev_popup</SELECT></TD>
</TR>";
@@ -1624,7 +1624,7 @@ if($::usergroupset ne '0') {
$knum++;
print "
<INPUT TYPE=radio NAME=knob VALUE=resolve>
Resolve bugs, changing <A HREF=\"bug_status.html\">resolution</A> to
Resolve bugs, changing <A HREF=\"bug_status.cgi\">resolution</A> to
<SELECT NAME=resolution
ONCHANGE=\"document.changeform.knob\[$knum\].checked=true\">
$resolution_popup</SELECT><br>";
@@ -1654,7 +1654,7 @@ if($::usergroupset ne '0') {
}
print "
<INPUT TYPE=radio NAME=knob VALUE=reassign>
<A HREF=\"bug_status.html#assigned_to\">Reassign</A> bugs to
<A HREF=\"bug_status.cgi#assigned_to\">Reassign</A> bugs to
<INPUT NAME=assigned_to SIZE=32
ONCHANGE=\"document.changeform.knob\[$knum\].checked=true\"
VALUE=\"$::COOKIE{'Bugzilla_login'}\"><br>";

View File

@@ -42,7 +42,7 @@ hopefully glance over their UNCONFIRMED bugs regularly.)
<p>
The <a href="bug_status.html">page describing bug fields</a> has been
The <a href="bug_status.cgi">page describing bug fields</a> has been
updated to include UNCONFIRMED.
<p>

View File

@@ -132,7 +132,7 @@ sub EmitFormElements ($$$$$$$$$)
print " <TD><INPUT SIZE=5 MAXLENGTH=5 NAME=\"maxvotesperbug\" VALUE=\"$maxvotesperbug\"></TD>\n";
print "</TR><TR>\n";
print " <TH ALIGN=\"right\">Number of votes a bug in this product needs to automatically get out of the <A HREF=\"bug_status.html#status\">UNCONFIRMED</A> state:</TH>\n";
print " <TH ALIGN=\"right\">Number of votes a bug in this product needs to automatically get out of the <A HREF=\"bug_status.cgi#status\">UNCONFIRMED</A> state:</TH>\n";
print " <TD><INPUT SIZE=5 MAXLENGTH=5 NAME=\"votestoconfirm\" VALUE=\"$votestoconfirm\"></TD>\n";
}

View File

@@ -329,9 +329,9 @@ print "
</TR>
<tr><td>&nbsp<td> <td> <td> <td> <td> </tr>
<TR>
<td align=right><B><A HREF=\"bug_status.html#rep_platform\">Platform:</A></B></td>
<td align=right><B><A HREF=\"bug_status.cgi#rep_platform\">Platform:</A></B></td>
<TD>$platform_popup</TD>
<TD ALIGN=RIGHT><B><A HREF=\"bug_status.html#op_sys\">OS:</A></B></TD>
<TD ALIGN=RIGHT><B><A HREF=\"bug_status.cgi#op_sys\">OS:</A></B></TD>
<TD>$opsys_popup</TD>
<td align=right valign=top></td>
<td rowspan=3></td>
@@ -340,14 +340,14 @@ print "
<TR>";
if (Param('letsubmitterchoosepriority')) {
print "
<TD ALIGN=RIGHT><B><A HREF=\"bug_status.html#priority\">Resolution<br>Priority</A>:</B></TD>
<TD ALIGN=RIGHT><B><A HREF=\"bug_status.cgi#priority\">Resolution<br>Priority</A>:</B></TD>
<TD>$priority_popup</TD>";
} else {
print '<INPUT TYPE=HIDDEN NAME=priority VALUE="' .
value_quote($priority) . '">';
}
print "
<TD ALIGN=RIGHT><B><A HREF=\"bug_status.html#severity\">Severity:</A></B></TD>
<TD ALIGN=RIGHT><B><A HREF=\"bug_status.cgi#severity\">Severity:</A></B></TD>
<TD>$sev_popup</TD>
<td></td>
<td></td>
@@ -361,7 +361,7 @@ if (UserInGroup("editbugs") || UserInGroup("canconfirm")) {
if (FetchOneColumn()) {
print qq{
<TR>
<TD ALIGN="right"><B><A HREF="bug_status.html#status">Initial state:</B></A></TD>
<TD ALIGN="right"><B><A HREF="bug_status.cgi#status">Initial state:</B></A></TD>
<TD COLSPAN="5">
};
print BuildPulldown("bug_status",
@@ -374,7 +374,7 @@ if (UserInGroup("editbugs") || UserInGroup("canconfirm")) {
print "
<tr>
<TD ALIGN=RIGHT><B><A HREF=\"bug_status.html#assigned_to\">Assigned To:</A></B></TD>
<TD ALIGN=RIGHT><B><A HREF=\"bug_status.cgi#assigned_to\">Assigned To:</A></B></TD>
<TD colspan=5>$assign_element
(Leave blank to assign to default component owner)</td>
</tr>

View File

@@ -75,7 +75,7 @@ for access speed):
<td rowspan=2><tt><nobr>UNCO,NEW,...,CLOS,</nobr><br><nobr>FIX,DUP,...</nobr> <i><nobr>(as first word)</nobr></i></tt></td>
<td><tt>status</tt></td>
<td>&nbsp;</td>
<td><a href="bug_status.html">Status</a>
<td><a href="bug_status.cgi">Status</a>
<i>("bug_status")</i>
</td>
</tr>
@@ -83,35 +83,35 @@ for access speed):
<td>&nbsp;</td>
<td><tt>resolution</tt></td>
<td>&nbsp;</td>
<td><a href="bug_status.html">Resolution</a></td>
<td><a href="bug_status.cgi">Resolution</a></td>
</tr>
<tr>
<td>&nbsp;</td>
<td><i>as-is</i></td>
<td><tt>platform</tt></td>
<td>&nbsp;</td>
<td><a href="bug_status.html#rep_platform">Platform</a> <i>("rep_platform")</i></td>
<td><a href="bug_status.cgi#rep_platform">Platform</a> <i>("rep_platform")</i></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td><tt>os</tt></td>
<td><tt>opsys</tt></td>
<td><a href="bug_status.html#op_sys">OS</a> <i>("op_sys")</i></td>
<td><a href="bug_status.cgi#op_sys">OS</a> <i>("op_sys")</i></td>
</tr>
<tr>
<td>&nbsp;</td>
<td><tt>p1,p2</tt> <i>or</i> <tt>p1-2</tt></td>
<td><tt>priority</tt></td>
<td><tt>pri</tt></td>
<td><a href="bug_status.html#priority">Priority</a></td>
<td><a href="bug_status.cgi#priority">Priority</a></td>
</tr>
<tr>
<td>&nbsp;</td>
<td><tt>blo,cri,...,enh</tt></td>
<td><tt>severity</tt></td>
<td><tt>sev</tt></td>
<td><a href="bug_status.html#severity">Severity</a> <i>("bug_severity")</i></td>
<td><a href="bug_status.cgi#severity">Severity</a> <i>("bug_severity")</i></td>
</tr>
<!-- People: AssignedTo, Reporter, QA Contact, CC, Added comment -->
@@ -122,7 +122,7 @@ for access speed):
<td><b>@</b><i>owner</i></td>
<td><tt>assignedto</tt></td>
<td><tt>assignee, owner</tt></td>
<td><a href="bug_status.html#assigned_to">Assignee</a> <i>("assigned_to")</i></td>
<td><a href="bug_status.cgi#assigned_to">Assignee</a> <i>("assigned_to")</i></td>
</tr>
<tr>
<td>&nbsp;</td>