Commit 482763c9 authored by terry%netscape.com's avatar terry%netscape.com

Bugzilla source.

parents
1x1.gif

82 Bytes

This diff is collapsed. Click to expand it.
ant.jpg

17.1 KB

# -*- Mode: tcl; indent-tabs-mode: nil -*-
#
# The contents of this file are subject to the Mozilla Public License
# Version 1.0 (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>
set query "
select
bug_id,
product,
version,
rep_platform,
op_sys,
bug_status,
resolution,
priority,
bug_severity,
component,
assigned_to,
reporter,
bug_file_loc,
short_desc,
date_format(creation_ts,'Y-m-d')
from bugs
where bug_id = $FORM(id)";
SendSQL $query
set ret [FetchSQLData]
if {$ret != ""} {
set count 0
foreach field { bug_id product version rep_platform op_sys bug_status
resolution priority bug_severity component
assigned_to reporter bug_file_loc short_desc
creation_ts} {
if { [regexp {^\{(.*)\}$} [lindex $ret $count] junk bug($field)] == 0 } {
set bug($field) [lindex $ret $count]
}
incr count
}
set error "none"
} else {
puts "<TITLE>Bug Splat Error</TITLE>"
puts "<H1>Query Error</H1>Somehow something went wrong. Possibly if you"
puts "mail this page to $maintainer, he will be able to fix things.<HR>"
puts "Bug $FORM(id) not found<H2>Query Text</H2><PRE>$query<PRE>"
exit 0
}
set bug(assigned_to) [DBID_to_name $bug(assigned_to)]
set bug(reporter) [DBID_to_name $bug(reporter)]
set bug(long_desc) [GetLongDescription $FORM(id)]
GetVersionTable
#
# These should be read from the database ...
#
set resolution_popup [make_options $legal_resolution_no_dup $bug(resolution)]
set platform_popup [make_options $legal_platform $bug(rep_platform)]
set priority_popup [make_options $legal_priority $bug(priority)]
set sev_popup [make_options $legal_severity $bug(bug_severity)]
set component_popup [make_options $components($bug(product)) $bug(component)]
set cc_element "<INPUT NAME=cc SIZE=30 VALUE=\"[ShowCcList $FORM(id)]\">"
if {$bug(bug_file_loc) != "none" && $bug(bug_file_loc) != "NULL" && $bug(bug_file_loc) != ""} {
set URL "<B><A HREF=\"$bug(bug_file_loc)\">URL:</A></B>"
} else {
set URL "<B>URL:</B>"
}
puts "
<HEAD><TITLE>Bug $FORM(id) -- [html_quote $bug(short_desc)]</TITLE></HEAD><BODY>
<FORM NAME=changeform METHOD=POST ACTION=\"process_bug.cgi\">
<INPUT TYPE=HIDDEN NAME=\"id\" VALUE=$FORM(id)>
<INPUT TYPE=HIDDEN NAME=\"was_assigned_to\" VALUE=\"$bug(assigned_to)\">
<TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0><TR>
<TD ALIGN=RIGHT><B>Bug#:</B></TD><TD>$bug(bug_id)</TD>
<TD ALIGN=RIGHT><B><A HREF=\"bug_status.html#rep_platform\">Platform:</A></B></TD>
<TD><SELECT NAME=rep_platform>$platform_popup</SELECT></TD>
<TD ALIGN=RIGHT><B>Version:</B></TD>
<TD><SELECT NAME=version>[make_options $versions($bug(product)) $bug(version)]</SELECT></TD>
</TR><TR>
<TD ALIGN=RIGHT><B>Product:</B></TD>
<TD><SELECT NAME=product>[make_options $legal_product $bug(product)]</SELECT></TD>
<TD ALIGN=RIGHT><B>OS:</B></TD><TD>$bug(op_sys)</TD>
<TD ALIGN=RIGHT><B>Reporter:</B></TD><TD>$bug(reporter)</TD>
</TR><TR>
<TD ALIGN=RIGHT><B><A HREF=\"bug_status.html\">Status:</A></B></TD>
<TD>$bug(bug_status)</TD>
<TD ALIGN=RIGHT><B><A HREF=\"bug_status.html#priority\">Priority:</A></B></TD>
<TD><SELECT NAME=priority>$priority_popup</SELECT></TD>
<TD ALIGN=RIGHT><B>Cc:</B></TD>
<TD> $cc_element </TD>
</TR><TR>
<TD ALIGN=RIGHT><B><A HREF=\"bug_status.html\">Resolution:</A></B></TD>
<TD>$bug(resolution)</TD>
<TD ALIGN=RIGHT><B><A HREF=\"bug_status.html#severity\">Severity:</A></B></TD>
<TD><SELECT NAME=bug_severity>$sev_popup</SELECT></TD>
<TD ALIGN=RIGHT><B>Component:</B></TD>
<TD><SELECT NAME=component>$component_popup</SELECT></TD>
</TR><TR>
<TD ALIGN=RIGHT><B><A HREF=\"bug_status.html#assigned_to\">Assigned&nbsp;To:
</A></B></TD>
<TD>$bug(assigned_to)</TD>
</TR><TR>
<TD ALIGN=\"RIGHT\">$URL
<TD COLSPAN=6>
<INPUT NAME=bug_file_loc VALUE=\"$bug(bug_file_loc)\" SIZE=60></TD>
</TR><TR>
<TD ALIGN=\"RIGHT\"><B>Summary:</B>
<TD COLSPAN=6>
<INPUT NAME=short_desc VALUE=\"[value_quote $bug(short_desc)]\" SIZE=60></TD>
</TR>
</TABLE>
<br>
<B>Additional Comments:</B>
<BR>
<TEXTAREA WRAP=HARD NAME=comment ROWS=5 COLS=80></TEXTAREA><BR>
<br>
<INPUT TYPE=radio NAME=knob VALUE=none CHECKED>
Leave as <b>$bug(bug_status) $bug(resolution)</b><br>"
# knum is which knob number we're generating, in javascript terms.
set knum 1
if {[cequal $bug(bug_status) NEW] || [cequal $bug(bug_status) ASSIGNED] || \
[cequal $bug(bug_status) REOPENED]} {
if {![cequal $bug(bug_status) ASSIGNED]} {
puts "<INPUT TYPE=radio NAME=knob VALUE=accept>
Accept bug (change status to <b>ASSIGNED</b>)<br>"
incr knum
}
if {[clength $bug(resolution)] > 0} {
puts "<INPUT TYPE=radio NAME=knob VALUE=clearresolution>"
puts "Clear the resolution (remove the current resolution of"
puts "<b>$bug(resolution)</b>)<br>"
incr knum
}
puts "<INPUT TYPE=radio NAME=knob VALUE=resolve>
Resolve bug, changing <A HREF=\"bug_status.html\">resolution</A> to
<SELECT NAME=resolution
ONCHANGE=\"document.changeform.knob\[$knum\].checked=true\">
$resolution_popup</SELECT><br>"
incr knum
puts "<INPUT TYPE=radio NAME=knob VALUE=duplicate>
Resolve bug, mark it as duplicate of bug #
<INPUT NAME=dup_id SIZE=6 ONCHANGE=\"document.changeform.knob\[$knum\].checked=true\"><br>"
incr knum
set assign_element "<INPUT NAME=assigned_to SIZE=32 ONCHANGE=\"document.changeform.knob\[$knum\].checked=true\" VALUE=$bug(assigned_to)>"
puts "<INPUT TYPE=radio NAME=knob VALUE=reassign>
<A HREF=\"bug_status.html#assigned_to\">Reassign</A> bug to
$assign_element
<br>"
incr knum
puts "<INPUT TYPE=radio NAME=knob VALUE=reassignbycomponent>
Reassign bug to owner of selected component<br>"
incr knum
} else {
puts "<INPUT TYPE=radio NAME=knob VALUE=reopen> Reopen bug<br>"
incr knum
if {[cequal $bug(bug_status) RESOLVED]} {
puts "<INPUT TYPE=radio NAME=knob VALUE=verify>
Mark bug as <b>VERIFIED</b><br>"
incr knum
}
if {![cequal $bug(bug_status) CLOSED]} {
puts "<INPUT TYPE=radio NAME=knob VALUE=close>
Mark bug as <b>CLOSED</b><br>"
incr knum
}
}
puts "
<INPUT TYPE=\"submit\" VALUE=\"Commit\">
<INPUT TYPE=\"reset\" VALUE=\"Reset\">
<INPUT TYPE=hidden name=form_name VALUE=process_bug>
<BR>
<FONT size=\"+1\"><B>
<A HREF=\"show_activity.cgi?id=$FORM(id)\">View Bug Activity</A>
<A HREF=\"long_list.cgi?buglist=$FORM(id)\">Format For Printing</A>
<A HREF=\"edit_desc.cgi?id=$FORM(id)\">Edit Long Description</A>
</B></FONT><BR>
</FORM>
<table><tr><td align=left><B>Description:</B></td><td width=100%>&nbsp;</td>
<td align=right>Opened:&nbsp;$bug(creation_ts)</td></tr></table>
<HR>
<PRE>
[html_quote $bug(long_desc)]
</PRE>
<HR>"
navigation_header
puts "</BODY>"
flush stdout
<HTML>
<!--
The contents of this file are subject to the Mozilla Public License
Version 1.0 (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>
-->
<TITLE>A Bug's Life Cycle</TITLE>
<h1 ALIGN=CENTER>A Bug's Life Cycle</h1>
The <B>status</B> and <B>resolution</B> field define and track the
life cycle of a bug.
<p>
<TABLE BORDER=1 CELLPADDING=4>
<TR ALIGN=CENTER VALIGN=TOP>
<TD WIDTH=50%><H1>STATUS</H1> <TD><H1>RESOLUTION</H1>
<TR VALIGN=TOP>
<TD>The <B>status</B> field indicates the general health of a bug. Only
certain status transitions are allowed.
<TD>The <b>resolution</b> field indicates what happened to this bug.
<TR VALIGN=TOP><TD>
<DL><DT><B>NEW</B>
<DD> This bug has recently been added to the assignee's list of bugs
and must be processed. Bugs in this state may be accepted, and
become <B>ASSIGNED</B>, passed on to someone else, and remain
<B>NEW</B>, or resolved and marked <B>RESOLVED</B>.
<DT><B>ASSIGNED</B>
<DD> This bug is not yet resolved, but is assigned to the proper
person. From here bugs can be given to another person and become
<B>NEW</B>, or resolved and become <B>RESOLVED</B>.
<DT><B>REOPENED</B>
<DD>This bug was once resolved, but the resolution was deemed
incorrect. For example, a <B>WORKSFORME</B> bug is
<B>REOPENED</B> when more information shows up and the bug is now
reproducible. From here bugs are either marked <B>ASSIGNED</B>
or <B>RESOLVED</B>.
</DL>
<TD>
<DL>
<DD> No resolution yet. All bugs which are <B>NEW</B> or
<B>ASSIGNED</B> have the resolution set to blank. All other bugs
will be marked with one of the following resolutions.
</DL>
<TR VALIGN=TOP><TD>
<DL>
<DT><B>RESOLVED</B>
<DD> A resolution has been taken, and it is awaiting verification by
QA. From here bugs are either re-opened and become
<B>REOPENED</B>, are marked <B>VERIFIED</B>, or are closed for good
and marked <B>CLOSED</B>.
<DT><B>VERIFIED</B>
<DD> QA has looked at the bug and the resolution and agrees that the
appropriate resolution has been taken. Bugs remain in this state
until the product they were reported against actually ship, at
which point the become <B>CLOSED</B>.
<DT><B>CLOSED</B>
<DD> The bug is considered dead, the resolution is correct. Any zombie
bugs who choose to walk the earth again must do so by becoming
<B>REOPENED</B>.
</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>
</TABLE>
<H1>Other Fields</H1>
<table border=1 cellpadding=4><tr><td>
<a name="severity"><h2>Severity</h2></a>
This field describes the impact of a bug.
<p>
<p>
<table>
<tr><th>Critical</th><td>crashes, loss of data, severe memory leak
<tr><th>Major</th><td>major loss of function
<tr><th>Minor</th><td>minor loss of function, or other problem where easy workaround is present
<tr><th>Trivial</th><td>cosmetic problem like misspelt words or misaligned text
<tr><th>Enhancement</th><td>Request for enhancement
</table>
</td><td>
<a name="priority"><h2>Priority</h2></a>
This field describes the importance and order in which a bug should be
fixed. The available priorities are:
<p>
<p>
<table>
<tr><th>P1</th><td>Most important
<tr><th>P2</th><td>
<tr><th>P3</th><td>
<tr><th>P4</th><td>
<tr><th>P5</th><td>Least important
</table>
</tr></table>
<a name="area"><h2>Area</h2></a>
This is the general area which is covered by the bug report. This allows
bugs to migrate over to testing, but not show up on the "daily bug list".
Most bugs should have area set to <B>CODE</B>. Legal values include:
<UL>
<LI> CODE
<LI> JAVA
<LI> TEST
<LI> UI
<LI> BUILD
<LI> PERF
<LI> i18n <i>(internationalization)</i>
<LI> l10n <i>(localization)</i>
</UL>
<a name="rep_platform"><h2>Platform</h2></a>
This is the platform against which the bug was reported. Legal
platforms include:
<UL>
<LI> All (happens on all platform; cross-platform bug)
<LI> Macintosh
<LI> PC
<LI> X-Windows
</UL>
<b>Note:</b> Selecting the option "All" does not select bugs assigned against all platforms. It
merely selects bugs that <b>occur</b> on all platforms.
<a name="assigned_to"><h2>Assigned To</h2></a>
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><A HREF="http://www.mozilla.org/owners.html">List of module owners.</a>
<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.
<hr>
<address><a href="http://home.netscape.com/people/terry/">Terry Weissman &lt;terry@netscape.com&gt;</a></address>
<!-- hhmts start -->
Last modified: Tue Aug 25 23:11:26 1998
<!-- hhmts end -->
</body> </html>
This diff is collapsed. Click to expand it.
#! /usr/bonsaitools/bin/mysqltcl
# -*- Mode: tcl; indent-tabs-mode: nil -*-
#
# The contents of this file are subject to the Mozilla Public License
# Version 1.0 (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>
source "CGI.tcl"
confirm_login
if {![info exists FORM(pwd1)]} {
puts "Content-type: text/html
<H1>Change your password</H1>
<form method=post>
<table>
<tr>
<td align=right>Please enter the new password for <b>$COOKIE(Bugzilla_login)</b>:</td>
<td><input type=password name=pwd1></td>
</tr>
<tr>
<td align=right>Re-enter your new password:</td>
<td><input type=password name=pwd2></td>
</table>
<input type=submit value=Submit>"
exit
}
if {![cequal $FORM(pwd1) $FORM(pwd2)]} {
puts "Content-type: text/html
<H1>Try again.</H1>
The two passwords you entered did not match. Please click <b>Back</b> and try again."
exit
}
set pwd $FORM(pwd1)
if {![regexp {^[a-zA-Z0-9-_]*$} $pwd] || [clength $pwd] < 3 || [clength $pwd] > 15} {
puts "Content-type: text/html
<H1>Sorry; we're picky.</H1>
Please choose a password that is between 3 and 15 characters long, and that
contains only numbers, letters, hyphens, or underlines.
<p>
Please click <b>Back</b> and try again."
exit
}
puts "Content-type: text/html\n"
SendSQL "update profiles set password='$pwd' where login_name='[SqlQuote $COOKIE(Bugzilla_login)]'"
puts "<H1>OK, done.</H1>
Your new password has been set.
<p>
<a href=query.cgi>Back to query page.</a>"
#! /usr/bonsaitools/bin/mysqltcl
# -*- Mode: tcl; indent-tabs-mode: nil -*-
#
# The contents of this file are subject to the Mozilla Public License
# Version 1.0 (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>
source "CGI.tcl"
puts "Content-type: text/html"
# The master list not only says what fields are possible, but what order
# they get displayed in.
set masterlist {opendate changeddate severity priority platform owner reporter status
resolution component product version project os summary summaryfull status_summary resolved_ts verified_ts}
if {[info exists FORM(rememberedquery)]} {
if {[info exists FORM(resetit)]} {
set collist $default_column_list
} else {
set collist {}
foreach i $masterlist {
if {[info exists FORM(column_$i)]} {
lappend collist $i
}
}
}
puts "Set-Cookie: COLUMNLIST=$collist ; path=/ ; expires=Sun, 30-Jun-99 00:00:00 GMT"
puts "Refresh: 0; URL=buglist.cgi?$FORM(rememberedquery)"
puts ""
puts "<TITLE>What a hack.</TITLE>"
puts "Resubmitting your query with new columns..."
exit
}
if {[info exists COOKIE(COLUMNLIST)]} {
set collist $COOKIE(COLUMNLIST)
} else {
set collist $default_column_list
}
foreach i $masterlist {
set desc($i) $i
}
set desc(summary) "Summary (first 60 characters)"
set desc(summaryfull) "Full Summary"
puts ""
puts "Check which columns you wish to appear on the list, and then click on"
puts "submit."
puts "<p>"
puts "<FORM ACTION=colchange.cgi>"
puts "<INPUT TYPE=HIDDEN NAME=rememberedquery VALUE=$buffer>"
foreach i $masterlist {
if {[lsearch $collist $i] >= 0} {
set c CHECKED
} else {
set c ""
}
puts "<INPUT TYPE=checkbox NAME=column_$i $c>$desc($i)<br>"
}
puts "<P>"
puts "<INPUT TYPE=\"submit\" VALUE=\"Submit\">"
puts "</FORM>"
puts "<FORM ACTION=colchange.cgi>"
puts "<INPUT TYPE=HIDDEN NAME=rememberedquery VALUE=$buffer>"
puts "<INPUT TYPE=HIDDEN NAME=resetit VALUE=1>"
puts "<INPUT TYPE=\"submit\" VALUE=\"Reset to Bugzilla default\">"
puts "</FORM>"
#! /usr/bonsaitools/bin/mysqltcl
# -*- Mode: tcl; indent-tabs-mode: nil -*-
#
# The contents of this file are subject to the Mozilla Public License
# Version 1.0 (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>
source "CGI.tcl"
puts "Content-type: text/plain\n"
set query "update bugs\nset
bug_status=RESOLVED,
bug_resolution=FIXED
where bug_id = $FORM(id)"
set newcomment "Fixed by changes in $FORM(directory):"
foreach i $FORM(fileversions) {
lassign $i file version
append newcomment "\n $file ($version)"
}
puts "Query is $query"
puts "Comment is $newcomment"
exit
ConnectToDatabase
SendSQL $query
while {[MoreSQLData]} {
FetchSQLData
set result [MoreSQLData]
}
AppendComment $FORM(id) $FORM(who) $newcomment
exec ./processmail $FORM(id) < /dev/null > /dev/null 2> /dev/null &
#! /usr/bonsaitools/bin/mysqltcl
# -*- Mode: tcl; indent-tabs-mode: nil -*-
#
# The contents of this file are subject to the Mozilla Public License
# Version 1.0 (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>
source "CGI.tcl"
confirm_login
puts "Content-type: text/html\n"
ConnectToDatabase
if {[info exists FORM(commit)]} {
puts "<TITLE>Changing Long Description for bug [FormData id]</TITLE>"
set tmpfile [TmpName ldesc.[pid]]
SendSQL "select rowid from bugs where bug_id = [FormData id]"
set r [FetchSQLData]
set lfile [open $tmpfile w]
puts -nonewline $lfile [FormData long_desc]
close $lfile
orawritelong $oc [lindex $r 0] bugs long_desc $tmpfile
unlink $tmpfile
oracommit $oc
puts "<H1>Long Description Changed</H1>"
puts "<UL><LI>"
puts "<A HREF=\"show_bug.cgi?id=[FormData id]\">Show Bug #[FormData id]</A>"
puts "<LI><A HREF=\"query.cgi\">Query Page</A>"
exec ./processmail [FormData id] < /dev/null > /dev/null 2> /dev/null &
exit 0
}
puts "<TITLE>Editing Long Description for bug [FormData id]</TITLE>"
puts "<H2>Be Careful</H2>"
puts "Many people think that the ability to edit the full long description
is a bad thing and that developers should not be allowed to do this,
because information can get lost. Please do not use this feature casually.
<P><HR>"
set generic_query {
select
bugs.bug_id,
bugs.product,
bugs.version,
bugs.rep_platform,
bugs.op_sys,
bugs.bug_status,
bugs.bug_severity,
bugs.priority,
bugs.resolution,
assign.login_name,
report.login_name,
bugs.bug_file_loc,
bugs.short_desc
from bugs,profiles assign,profiles report,priorities
where assign.userid = bugs.assigned_to and report.userid = bugs.reporter and
}
SendSQL "$generic_query bugs.bug_id = [FormData id]"
set result [ FetchSQLData ]
puts "<TABLE WIDTH=100%>"
puts "<TD COLSPAN=4><TR><DIV ALIGN=CENTER><B><FONT =\"+3\">[html_quote [lindex $result 13]]</B></FONT></DIV>"
puts "<TR><TD><B>Bug#:</B> [lindex $result 0]"
puts "<TD><B>Product:</B> [lindex $result 1]"
puts "<TD><B>Version:</B> [lindex $result 2]"
puts "<TD><B>Platform:</B> [lindex $result 3]"
puts "<TR><TD><B>OS/Version:</B> [lindex $result 4]"
puts "<TD><B>Status:</B> [lindex $result 5]"
puts "<TD><B>Severity:</B> [lindex $result 6]"
puts "<TD><B>Priority:</B> [lindex $result 7]"
puts "</TD><TD><B>Resolution:</B> [lindex $result 8]</TD>"
puts "<TD><B>Assigned To:</B> [lindex $result 9]"
puts "<TD><B>Reported By:</B> [lindex $result 10]"
puts "<TR><TD COLSPAN=6><B>URL:</B> [html_quote [lindex $result 11]]"
puts "<TR><TD><B>Description:</B>\n</TABLE>"
set ldesc [GetLongDescription [FormData id]]
set lines [llength [split $ldesc "\n"]]
incr lines 10
if {$lines > 100} {
set lines 100
}
if {[regexp {Macintosh} $env(HTTP_USER_AGENT)]} {
set cols 160
} else {
set cols 80
}
puts "<FORM METHOD=POST ACTION=\"edit_desc.cgi\">
<INPUT TYPE=HIDDEN NAME=\"id\" VALUE=$FORM(id)>
<INPUT TYPE=HIDDEN NAME=\"commit\" VALUE=yes>
<TEXTAREA NAME=long_desc WRAP=HARD COLS=$cols ROWS=$lines>
[html_quote $ldesc]
</TEXTAREA>
<INPUT TYPE=SUBMIT VALUE=\"Change Description\">
</FORM>"
#! /usr/bonsaitools/bin/mysqltcl
# -*- Mode: tcl; indent-tabs-mode: nil -*-
#
# The contents of this file are subject to the Mozilla Public License
# Version 1.0 (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>
source CGI.tcl
confirm_login
puts "Content-type: text/html\n"
proc pickplatform {} {
global env FORM
if {[formvalue rep_platform] != ""} {
return [formvalue rep_platform]
}
switch -regexp $env(HTTP_USER_AGENT) {
{Mozilla.*\(X11} {return "X-Windows"}
{Mozilla.*\(Windows} {return "PC"}
{Mozilla.*\(Macintosh} {return "Macintosh"}
{Mozilla.*\(Win} {return "PC"}
default {return "PC"}
}
}
proc pickproduct {} {
global FORM env COOKIE product versions
set product missingProductSoPickDefault
set product [formvalue product]
if {$product == ""} {
if {[info exists COOKIE(PRODUCT)]} {
set product $COOKIE(PRODUCT)
} else {
switch -regexp $env(HTTP_USER_AGENT) {
{2.0Gold} {set product "Hearst"}
{4\.0.*; *Nav} { set product "Ratbert"}
{4\.0} {set product "Communicator"}
{3\.0} {set product "Akbar"}
{2\.0} {set product "Cheddar"}
}
}
}
if {![info exists versions($product)]} { set product "Communicator" }
return $product
}
proc pickversion {} {
global env versions product FORM
set version [formvalue version]
if {$version == ""} {
regexp {Mozilla[ /]([^ ]*) } $env(HTTP_USER_AGENT) foo version
switch -regexp $env(HTTP_USER_AGENT) {
{4\.09} { set version "4.5" }
}
}
if {[lsearch -exact $versions($product) $version] >= 0} {
return $version
} else {
if {[info exists COOKIE(VERSION-$product)]} {
if {[lsearch -exact $versions($product) $COOKIE(VERSION-$Product)] >= 0} {
return $COOKIE(VERSION-$Product)
}
}
}
return [lindex $versions($product) 0]
}
proc pickcomponent {} {
global components product FORM
set result [formvalue component]
if {![cequal $result ""] && \
[lsearch -exact $components($product) $result] < 0} {
set result ""
}
return $result
}
proc pickos {} {
global env FORM
if {[formvalue op_sys] != ""} {
return [formvalue op_sys]
}
switch -regexp $env(HTTP_USER_AGENT) {
{Mozilla.*\(.*;.*; IRIX.*\)} {return "IRIX"}
{Mozilla.*\(.*;.*; 32bit.*\)} {return "Windows 95"}
{Mozilla.*\(.*;.*; 16bit.*\)} {return "Windows 3.1"}
{Mozilla.*\(.*;.*; 68K.*\)} {return "System 7.5"}
{Mozilla.*\(.*;.*; PPC.*\)} {return "System 7.5"}
{Mozilla.*\(.*;.*; OSF.*\)} {return "OSF/1"}
{Mozilla.*\(.*;.*; Linux.*\)} {return "Linux"}
{Mozilla.*\(.*;.*; SunOS 5.*\)} {return "Solaris"}
{Mozilla.*\(.*;.*; SunOS.*\)} {return "SunOS"}
{Mozilla.*\(.*;.*; SunOS.*\)} {return "SunOS"}
{Mozilla.*\(Win16.*\)} {return "Windows 3.1"}
{Mozilla.*\(Win95.*\)} {return "Windows 95"}
{Mozilla.*\(WinNT.*\)} {return "Windows NT"}
default {return "other"}
}
}
proc formvalue {name {default ""}} {
global FORM
if {[info exists FORM($name)]} {
return [FormData $name]
}
return $default
}
GetVersionTable
pickproduct
set assign_element [GeneratePersonInput assigned_to 1 [formvalue assigned_to]]
set cc_element [GeneratePeopleInput cc [formvalue cc ""]]
set priority_popup [make_popup priority $legal_priority [formvalue priority "P2"] 0]
set sev_popup [make_popup bug_severity $legal_severity [formvalue bug_severity "normal"] 0]
set platform_popup [make_popup rep_platform $legal_platform [pickplatform] 0]
set opsys_popup [make_popup op_sys $legal_opsys [pickos] 0]
set component_popup [make_popup component $components($product) \
[formvalue component] 1]
PutHeader "Enter Bug" "Enter Bug"
puts "
<FORM NAME=enterForm METHOD=POST ACTION=\"post_bug.cgi\">
<INPUT TYPE=HIDDEN NAME=bug_status VALUE=NEW>
<INPUT TYPE=HIDDEN NAME=reporter VALUE=$COOKIE(Bugzilla_login)>
<TABLE CELLSPACING=2 CELLPADDING=0 BORDER=0>
<TR>
<td ALIGN=right valign=top><B>Product:</B></td>
<td>[Product_element $product]</td>
<td ALIGN=right valign=top><B>Version:</B></td>
<td>[Version_element [pickversion] $product]</td>
<td align=right valign=top><b>Component:</b></td>
<td>$component_popup</td>
</TR>
<tr><td>&nbsp<td> <td> <td> <td> <td> </tr>
<TR>
<td align=right><b><B><A HREF=\"bug_status.html#rep_platform\">Platform:</A></B></td>
<TD>$platform_popup</TD>
<TD ALIGN=RIGHT><B>OS:</B></TD>
<TD>$opsys_popup</TD>
<td align=right valign=top></td>
<td rowspan=3></td>
<td></td>
</TR>
<TR>
<TD ALIGN=RIGHT><B><A HREF=\"bug_status.html#priority\">Priority</A>:</B></TD>
<TD>$priority_popup</TD>
<TD ALIGN=RIGHT><B><A HREF=\"bug_status.html#severity\">Severity</A>:</B></TD>
<TD>$sev_popup</TD>
<td></td>
<td></td>
</TR>
<tr><td>&nbsp<td> <td> <td> <td> <td> </tr>
<tr>
<TD ALIGN=RIGHT><B><A HREF=\"bug_status.html#assigned_to\">Assigned To:
</A></B></TD>
<TD colspan=5>$assign_element
(Leave blank to assign to default owner for component)</td>
</tr>
<tr>
<TD ALIGN=RIGHT ><B>Cc:</B></TD>
<TD colspan=5>$cc_element</TD>
</tr>
<tr><td>&nbsp<td> <td> <td> <td> <td> </tr>
<TR>
<TD ALIGN=RIGHT><B>URL:</B>
<TD COLSPAN=5>
<INPUT NAME=bug_file_loc SIZE=60 value=\"[value_quote [formvalue bug_file_loc]]\"></TD>
</TR>
<TR>
<TD ALIGN=RIGHT><B>Summary:</B>
<TD COLSPAN=5>
<INPUT NAME=short_desc SIZE=60 value=\"[value_quote [formvalue short_desc]]\"></TD>
</TR>
<tr><td>&nbsp<td> <td> <td> <td> <td> </tr>
<tr>
<td aligh=right valign=top><B>Description:</b>
<td colspan=5><TEXTAREA WRAP=HARD NAME=comment ROWS=10 COLS=80>[value_quote [formvalue comment]]</TEXTAREA><BR></td>
</tr>
<tr>
<td></td>
<td colspan=5>
<INPUT TYPE=\"submit\" VALUE=\" Commit \">
&nbsp;&nbsp;&nbsp;&nbsp;
<INPUT TYPE=\"reset\" VALUE=\"Reset\">
&nbsp;&nbsp;&nbsp;&nbsp;
<INPUT TYPE=\"submit\" NAME=maketemplate VALUE=\"Remember values as bookmarkable template\">
</td>
</tr>
</TABLE>
<INPUT TYPE=hidden name=form_name VALUE=enter_bug>
</FORM>
Some fields initialized from your user-agent, <b>$env(HTTP_USER_AGENT)</b>.
If you think it got it wrong, please tell $maintainer what it should have been.
</BODY></HTML>"
flush stdout
This diff is collapsed. Click to expand it.
<HTML>
<!--
The contents of this file are subject to the Mozilla Public License
Version 1.0 (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>
-->
<TITLE>Clue</TITLE>
<H1>A Clue</H1>
This form will allow you to call up a subset of the bug list.
You should be able to add the URL of the resulting list to
your bookmark file in order to preserve queries.
<p>
The way the query works, if you have nothing checked in a box,
then all values for that field are legal, for example if you checked nothing
in any of the boxes, you would get the entire bug list.
<p>
The default value of this form should correspond roughly to a "personal"
bug list.
<HR>
<H2>Running queries not supported by the pretty boxes</H2>
There is a hacky way to do some searches that aren't supported by the
form. The buglist script will build queries based on the URL, so
you can add other criteria.
<P>
For example, if you wanted to see all bugs reported against the X platform
and assigned to jwz, you could ask for all bugs assign to jwz, then
edit the URL in the "Location" box, adding the clause "&rep_platform=X-Windows"
to the URL.
<P>
Here is a list of some of the field names you could use for additional
unsupported searches ...
<PRE>
version
rep_platform
op_sys
reporter area
bug_file_loc
short_desc
</PRE>
<HTML>
<!--
The contents of this file are subject to the Mozilla Public License
Version 1.0 (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>
-->
<TITLE>How to Mail to bugzilla</TITLE>
<H1>THIS DOESN'T WORK RIGHT NOW. Coming someday.</H1>
Mailing to "bugzilla" will be piped through a script which examines
your message, stripping out control lines, and passing the rest of the
message in as the description of a new bug. The control lines look like: <P>
<PRE>
@FIELD-LABEL VALUE
LABEL Legal Values
Priority critical major normal minor trivial
Type BUG RFE
Product Cheddar
Platform PC X-Windows Macintosh All
Area CODE JAVA TEST BUILD UI PERF
Version version 2.0b1 2.0b2 2.0b2 2.0b4 2.1a0 2.1a1 2.1b0 2.1b1 2.1b2
OS Windows 3.1 Windows 95 Windows NT System 7 System 7.5
AIX BSDI HP-UX IRIX Linux OSF/1 Solaris SunOS other
Summary -anything-
URL -anything-
Assign someone in eng
and
@description
This tells the bug parse to stop looking for control lines,
allowing the bug description to contain lines which start with @
</PRE>
There are default values for all these fields. If you don't specify a
Summary, the subject of the mail message is used. <P>
If you specify an illegal value, the default value is used, the
bug is assigned to you, and the answerback message will describe
the error. <P>
After the bug is posted, you will get mail verifying the posting
and informing you of the bug number if you wish to fix any
mistakes made by the auto-processor. <P>
EXAMPLE: <P>
<PRE>
% Mail bugzilla
Subject: WinFE crashes with GPF when I pour beer on my keyboard
@priority critical
@platform PC
@assign troy
After the beer bash I emptied the rest of the keg onto my keyboard
and my sharp build of Navigator got a GPF.
.
</PRE>
<HTML>
<!--
The contents of this file are subject to the Mozilla Public License
Version 1.0 (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>
-->
<HEAD><TITLE>Bugzilla Main Page</TITLE></HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000"
LINK="#0000EE" VLINK="#551A8B" ALINK="#FF0000">
<TABLE BGCOLOR="#000000" WIDTH="100%" BORDER=0 CELLPADDING=0 CELLSPACING=0>
<TR><TD><A HREF="http://www.mozilla.org/"><IMG
SRC="http://www.mozilla.org/images/mozilla-banner.gif" ALT=""
BORDER=0 WIDTH=600 HEIGHT=58></A></TD></TR></TABLE>
<TABLE BORDER=0 CELLPADDING=12 CELLSPACING=0 WIDTH="100%">
<TR>
<TD>
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=2>
<TR><TD VALIGN=TOP ALIGN=CENTER NOWRAP>
<FONT SIZE="+3"><B><NOBR>Main Page</NOBR></B></FONT>
</TD></TR><TR><TD VALIGN=TOP ALIGN=CENTER>
<B></B>
</TD></TR>
</TABLE>
</TD>
<TD>
This is <B>Bugzilla</B>: the Mozilla bug system. For more
information about what Bugzilla is and what it can do, see
<A HREF="http://www.mozilla.org/">mozilla.org</A>'s
<A HREF="http://www.mozilla.org/bugs/"><B>bug pages</B></A>.
</TD></TR></TABLE>
<body>
<img align=right width=329 height=220 src=ant.jpg>
This is where we put in lots of nifty words explaining all about
bugzilla.
<p>
But it all boils down to a choice of:
<br>
<a href="query.cgi">Go to the query page to start.</a><br>
<a href="enter_bug.cgi">Enter a new bug</a>
<FORM METHOD=GET ACTION=show_bug.cgi><INPUT TYPE=SUBMIT VALUE="Find"> bug
# <INPUT NAME=id SIZE=6></FORM></TD>
</BODY>
</HTML>
#! /usr/bonsaitools/bin/mysqltcl
# -*- Mode: tcl; indent-tabs-mode: nil -*-
#
# The contents of this file are subject to the Mozilla Public License
# Version 1.0 (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>
source "CGI.tcl"
puts "Content-type: text/html\n"
puts "<TITLE>Full Text Bug Listing</TITLE>"
set generic_query {
select
bugs.bug_id,
bugs.product,
bugs.version,
bugs.rep_platform,
bugs.op_sys,
bugs.bug_status,
bugs.bug_severity,
bugs.priority,
bugs.resolution,
assign.login_name,
report.login_name,
bugs.component,
bugs.target_fix_version,
bugs.bug_file_loc,
bugs.short_desc
from bugs,profiles assign,profiles report
where assign.userid = bugs.assigned_to and report.userid = bugs.reporter and
}
ConnectToDatabase
foreach bug [split $FORM(buglist) :] {
SendSQL "$generic_query bugs.bug_id = $bug\n"
if { [ MoreSQLData ] } {
set result [ FetchSQLData ]
puts "<IMG SRC=\"1x1.gif\" WIDTH=1 HEIGHT=80 ALIGN=LEFT>"
puts "<TABLE WIDTH=100%>"
puts "<TD COLSPAN=4><TR><DIV ALIGN=CENTER><B><FONT =\"+3\">[html_quote [lindex $result 15]]</B></FONT></DIV>"
puts "<TR><TD><B>Bug#:</B> <A HREF=\"show_bug.cgi?id=[lindex $result 0]\">[lindex $result 0]</A>"
puts "<TD><B>Product:</B> [lindex $result 1]"
puts "<TD><B>Version:</B> [lindex $result 2]"
puts "<TD><B>Platform:</B> [lindex $result 3]"
puts "<TR><TD><B>OS/Version:</B> [lindex $result 4]"
puts "<TD><B>Status:</B> [lindex $result 5]"
puts "<TD><B>Severity:</B> [lindex $result 6]"
puts "<TD><B>Priority:</B> [lindex $result 7]"
puts "<TR><TD><B>Resolution:</B> [lindex $result 8]</TD>"
puts "<TD><B>Assigned To:</B> [lindex $result 9]"
puts "<TD><B>Reported By:</B> [lindex $result 10]"
puts "<TR><TD><B>Component:</B> [lindex $result 11]"
puts "<TD><B>Target Fix Version:</B> [lindex $result 12]"
puts "<TR><TD COLSPAN=6><B>URL:</B> [html_quote [lindex $result 13]]"
puts "<TR><TD COLSPAN=6><B>Summary&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:</B> [html_quote [lindex $result 14]]"
puts "<TR><TD><B>Description&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:</B>\n</TABLE>"
puts "<PRE>[html_quote [GetLongDescription $bug]]</PRE>"
puts "<HR>"
}
}
puts "<h6>Mozilla Communications Corporation, Company Confidential, read and eat.</h6>"
#!/bin/sh
#
# The contents of this file are subject to the Mozilla Public License
# Version 1.0 (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>
mysql > /dev/null 2>/dev/null << OK_ALL_DONE
use bugs;
drop table bugs_activity
OK_ALL_DONE
mysql << OK_ALL_DONE
use bugs;
create table bugs_activity (
bug_id mediumint not null,
who mediumint not null,
when datetime not null,
field varchar(64) not null,
oldvalue tinytext,
newvalue tinytext,
index (bug_id),
index (when)
);
show columns from bugs_activity;
show index from bugs_activity;
OK_ALL_DONE
#!/bin/sh
#
# The contents of this file are subject to the Mozilla Public License
# Version 1.0 (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>
mysql > /dev/null 2>/dev/null << OK_ALL_DONE
use bugs;
drop table bugs;
OK_ALL_DONE
mysql << OK_ALL_DONE
use bugs;
create table bugs (
bug_id mediumint not null auto_increment primary key,
assigned_to mediumint not null, # This is a comment.
bug_file_loc text,
bug_severity enum("critical", "major", "normal", "minor", "trivial", "enhancement") not null,
bug_status enum("NEW", "ASSIGNED", "REOPENED", "RESOLVED", "VERIFIED", "CLOSED") not null,
creation_ts datetime,
delta_ts timestamp,
short_desc mediumtext,
long_desc mediumtext,
op_sys tinytext,
priority enum("P1", "P2", "P3", "P4", "P5") not null,
product varchar(16) not null,
rep_platform enum("All", "DEC", "HP", "Macintosh", "PC", "SGI", "Sun", "X-Windows", "Other"),
reporter mediumint not null,
version varchar(16) not null,
area enum("BUILD", "CODE", "CONTENT", "DOC", "PERFORMANCE", "TEST", "UI", "i18n", "l10n") not null,
component varchar(50) not null,
resolution enum("", "FIXED", "INVALID", "WONTFIX", "LATER", "REMIND", "DUPLICATE", "WORKSFORME") not null,
index (assigned_to),
index (delta_ts),
index (bug_severity),
index (bug_status),
index (priority),
index (product),
index (reporter),
index (version),
index (area),
index (component),
index (resolution)
);
show columns from bugs;
show index from bugs;
OK_ALL_DONE
#!/bin/sh
#
# The contents of this file are subject to the Mozilla Public License
# Version 1.0 (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>
mysql > /dev/null 2>/dev/null << OK_ALL_DONE
use bugs;
drop table cc
OK_ALL_DONE
mysql << OK_ALL_DONE
use bugs;
create table cc (
bug_id mediumint not null,
who mediumint not null
);
show columns from cc;
show index from cc;
OK_ALL_DONE
#!/bin/sh
#
# The contents of this file are subject to the Mozilla Public License
# Version 1.0 (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>
mysql > /dev/null 2>/dev/null << OK_ALL_DONE
use bugs;
drop table components
OK_ALL_DONE
mysql << OK_ALL_DONE
use bugs;
create table components (
value tinytext,
program tinytext,
initialowner tinytext # Should arguably be a mediumint!
);
insert into components (value, program, initialowner) values ("Macintosh FE", "Communicator", "sdagley@netscape.com");
insert into components (value, program, initialowner) values ("Windows FE", "Communicator", "blythe@netscape.com");
insert into components (value, program, initialowner) values ("XFE", "Communicator", "ramiro@netscape.com");
insert into components (value, program, initialowner) values ("StubFE", "Communicator", "toshok@netscape.com");
insert into components (value, program, initialowner) values ("Aurora/RDF FE", "Communicator", "don@netscape.com");
insert into components (value, program, initialowner) values ("Aurora/RDF BE", "Communicator", "guha@netscape.com");
insert into components (value, program, initialowner) values ("Berkeley DB", "Communicator", "montulli@netscape.com");
insert into components (value, program, initialowner) values ("Browser Hooks", "Communicator", "ebina@netscape.com");
insert into components (value, program, initialowner) values ("Build Config", "Communicator", "briano@netscape.com");
insert into components (value, program, initialowner) values ("Composer", "Communicator", "brade@netscape.com");
insert into components (value, program, initialowner) values ("Compositor Library", "Communicator", "vidur@netscape.com");
insert into components (value, program, initialowner) values ("Dialup", "Communicator", "selmer@netscape.com");
insert into components (value, program, initialowner) values ("FontLib", "Communicator", "dp@netscape.com");
insert into components (value, program, initialowner) values ("HTML Dialogs", "Communicator", "nisheeth@netscape.com");
insert into components (value, program, initialowner) values ("HTML to Text/PostScript Translation", "Communicator", "brendan@netscape.com");
insert into components (value, program, initialowner) values ("ImageLib", "Communicator", "pnunn@netscape.com");
insert into components (value, program, initialowner) values ("JPEG Image Handling", "Communicator", "tgl@sss.pgh.pa.us");
insert into components (value, program, initialowner) values ("PNG Image Handling", "Communicator", "png@wco.com");
insert into components (value, program, initialowner) values ("Image Conversion Library", "Communicator", "mjudge@netscape.com");
insert into components (value, program, initialowner) values ("I18N Library", "Communicator", "bobj@netscape.com");
insert into components (value, program, initialowner) values ("Java Stubs", "Communicator", "warren@netscape.com");
insert into components (value, program, initialowner) values ("JavaScript", "Communicator", "mccabe@netscape.com");
insert into components (value, program, initialowner) values ("JavaScript Debugger", "Communicator", "jband@netscape.com");
insert into components (value, program, initialowner) values ("JavaScript/Java Reflection", "Communicator", "fur@netscape.com");
insert into components (value, program, initialowner) values ("Layout", "Communicator", "djw@netscape.com");
insert into components (value, program, initialowner) values ("LibMocha", "Communicator", "chouck@netscape.com");
insert into components (value, program, initialowner) values ("MIMELib", "Communicator", "terry@netscape.com");
insert into components (value, program, initialowner) values ("NetLib", "Communicator", "gagan@netscape.com");
insert into components (value, program, initialowner) values ("NSPR", "Communicator", "wtc@netscape.com");
insert into components (value, program, initialowner) values ("Password Cache", "Communicator", "montulli@netscape.com");
insert into components (value, program, initialowner) values ("PICS", "Communicator", "montulli@netscape.com");
insert into components (value, program, initialowner) values ("Plugins", "Communicator", "byrd@netscape.com");
insert into components (value, program, initialowner) values ("Preferences", "Communicator", "aoki@netscape.com");
insert into components (value, program, initialowner) values ("Progress Window", "Communicator", "atotic@netscape.com");
insert into components (value, program, initialowner) values ("Registry", "Communicator", "dveditz@netscape.com");
insert into components (value, program, initialowner) values ("Scheduler", "Communicator", "aoki@netscape.com");
insert into components (value, program, initialowner) values ("Security Stubs", "Communicator", "jsw@netscape.com");
insert into components (value, program, initialowner) values ("SmartUpdate", "Communicator", "dveditz@netscape.com");
insert into components (value, program, initialowner) values ("XML", "Communicator", "guha@netscape.com");
insert into components (value, program, initialowner) values ("XP-COM", "Communicator", "scullin@netscape.com");
insert into components (value, program, initialowner) values ("XP File Handling", "Communicator", "atotic@netscape.com");
insert into components (value, program, initialowner) values ("XP Miscellany", "Communicator", "brendan@netscape.com");
insert into components (value, program, initialowner) values ("XP Utilities", "Communicator", "toshok@netscape.com");
insert into components (value, program, initialowner) values ("Zlib", "Communicator", "pnunn@netscape.com");
insert into components (value, program, initialowner) values ("Platform: Lesstif on Linux", "Communicator", "ramiro@netscape.com");
insert into components (value, program, initialowner) values ("Platform: OS/2", "Communicator", "law@netscape.com");
insert into components (value, program, initialowner) values ("Platform: MacOS/PPC", "Communicator", "sdagley@netscape.com");
insert into components (value, program, initialowner) values ("Platform: Rhapsody", "Communicator", "mcafee@netscape.com");
insert into components (value, program, initialowner) values ("Platform: MFC/Win32 on Windows", "Communicator", "blythe@netscape.com");
insert into components (value, program, initialowner) values ("UI", "Bugzilla", "terry@netscape.com");
insert into components (value, program, initialowner) values ("Database", "Bugzilla", "terry@netscape.com");
select * from components;
show columns from components;
show index from components;
OK_ALL_DONE
#!/bin/sh
#
# The contents of this file are subject to the Mozilla Public License
# Version 1.0 (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>
mysql > /dev/null 2>/dev/null << OK_ALL_DONE
use bugs;
drop table profiles
OK_ALL_DONE
mysql << OK_ALL_DONE
use bugs;
create table profiles (
userid mediumint not null auto_increment primary key,
login_name varchar(255) not null,
password varchar(16),
realname varchar(255),
index(login_name)
);
show columns from profiles;
show index from profiles;
OK_ALL_DONE
#!/bin/sh
#
# The contents of this file are subject to the Mozilla Public License
# Version 1.0 (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>
mysql > /dev/null 2>/dev/null << OK_ALL_DONE
use bugs;
drop table versions
OK_ALL_DONE
mysql << OK_ALL_DONE
use bugs;
create table versions (
value tinytext,
program tinytext
);
insert into versions (value, program) values ("other", "Communicator");
insert into versions (value, program) values ("1998-03-31", "Communicator");
insert into versions (value, program) values ("1998-04-08", "Communicator");
insert into versions (value, program) values ("1998-04-29", "Communicator");
insert into versions (value, program) values ("1998-06-03", "Communicator");
insert into versions (value, program) values ("1998-07-28", "Communicator");
insert into versions (value, program) values ("1.0", "Bugzilla");
insert into versions (value, program) values ("other", "Bugzilla");
select * from versions;
show columns from versions;
show index from versions;
OK_ALL_DONE
#!/usr/bonsaitools/bin/perl
# -*- Mode: perl; indent-tabs-mode: nil -*-
#
# The contents of this file are subject to the Mozilla Public License
# Version 1.0 (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>
if ($ENV{'REQUEST_METHOD'} eq "GET") { $buffer = $ENV{'QUERY_STRING'}; }
else { read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); }
# Split the name-value pairs
@pairs = split(/&/, $buffer);
foreach $pair (@pairs)
{
($name, $value) = split(/=/, $pair);
$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$FORM{$name} = $value;
}
open(COMMENTS, ">>comments");
$c=$FORM{"comment"};
print COMMENTS $FORM{"comment"} . "\n";
close(COMMENTS);
print "Content-type: text/html\n\n";
print "<TITLE>The Word Of Confirmation</TITLE>";
print "<H1>Done</H1>";
print $c;
<HTML>
<!--
The contents of this file are subject to the Mozilla Public License
Version 1.0 (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>
-->
<TITLE>I'm So Pretty and Witty And Wise</TITLE>
<H2>Add your own clever headline.</h2>
The buglist picks a random quip for the headline, and
you can extend the quip list. Type in something clever or
funny or boring and bonk on the button.
<HR>
<FORM METHOD=POST ACTION="new_comment.cgi">
<INPUT SIZE=80 NAME="comment"><BR>
<INPUT TYPE="submit" VALUE="Add This Quip"></FORM>
</HR>
For the impatient, you can
<A HREF="comments">view the whole quip list</A>.
#! /usr/bonsaitools/bin/mysqltcl
# -*- Mode: tcl; indent-tabs-mode: nil -*-
#
# The contents of this file are subject to the Mozilla Public License
# Version 1.0 (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>
source "CGI.tcl"
confirm_login
puts "Set-Cookie: PLATFORM=$FORM(product) ; path=/ ; expires=Sun, 30-Jun-99 00:00:00 GMT"
puts "Set-Cookie: VERSION-$FORM(product)=$FORM(version) ; path=/ ; expires=Sun, 30-Jun-99 00:00:00 GMT"
puts "Content-type: text/html\n"
if {[info exists FORM(maketemplate)]} {
puts "<TITLE>Bookmarks are your friend.</TITLE>"
puts "<H1>Template constructed.</H1>"
set url "enter_bug.cgi?$buffer"
puts "If you put a bookmark <a href=\"$url\">to this link</a>, it will"
puts "bring up the submit-a-new-bug page with the fields initialized"
puts "as you've requested."
exit
}
PutHeader "Posting Bug -- Please wait" "Posting Bug" "One moment please..."
flush stdout
umask 0
ConnectToDatabase
if {![info exists FORM(component)] || [cequal $FORM(component) ""]} {
puts "You must choose a component that corresponds to this bug. If"
puts "necessary, just guess. But please hit the <B>Back</B> button and"
puts "choose a component."
exit 0
}
set forceAssignedOK 0
if {[cequal "" $FORM(assigned_to)]} {
SendSQL "select initialowner from components
where program='[SqlQuote $FORM(product)]'
and value='[SqlQuote $FORM(component)]'"
set FORM(assigned_to) [lindex [FetchSQLData] 0]
set forceAssignedOK 1
}
set FORM(assigned_to) [DBNameToIdAndCheck $FORM(assigned_to) $forceAssignedOK]
set FORM(reporter) [DBNameToIdAndCheck $FORM(reporter)]
set bug_fields { reporter product version rep_platform bug_severity \
priority op_sys assigned_to bug_status bug_file_loc \
short_desc component }
set query "insert into bugs (\n"
foreach field $bug_fields {
append query "$field,\n"
}
append query "creation_ts, long_desc )\nvalues (\n"
foreach field $bug_fields {
if {$field == "qa_assigned_to"} {
set valin [DBname_to_id $FORM($field)]
if {$valin == "__UNKNOWN__"} {
append query "null,\n"
} else {
append query "$valin,\n"
}
} else {
regsub -all "'" [FormData $field] "''" value
append query "'$value',\n"
}
}
append query "now(), "
append query "'[SqlQuote [FormData comment]]' )\n"
set ccids(zz) 1
unset ccids(zz)
if {[info exists FORM(cc)]} {
foreach person [split $FORM(cc) " ,"] {
if {![cequal $person ""]} {
set ccids([DBNameToIdAndCheck $person]) 1
}
}
}
# puts "<PRE>$query</PRE>"
SendSQL $query
while {[MoreSQLData]} { set ret [FetchSQLData] }
SendSQL "select LAST_INSERT_ID()"
set id [FetchSQLData]
foreach person [array names ccids] {
SendSQL "insert into cc (bug_id, who) values ($id, $person)"
while { [ MoreSQLData ] } { FetchSQLData }
}
# Now make sure changes are written before we run processmail...
Disconnect
puts "<H2>Changes Submitted</H2>"
puts "<A HREF=\"show_bug.cgi?id=$id\">Show BUG# $id</A>"
puts "<BR><A HREF=\"query.cgi\">Back To Query Page</A>"
flush stdout
exec ./processmail $id < /dev/null > /dev/null 2> /dev/null &
exit
#! /usr/bonsaitools/bin/mysqltcl
# -*- Mode: tcl; indent-tabs-mode: nil -*-
#
# The contents of this file are subject to the Mozilla Public License
# Version 1.0 (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>
source "CGI.tcl"
confirm_login
puts "Content-type: text/html\n"
GetVersionTable
if {![cequal $FORM(product) $dontchange]} {
set prod [FormData product]
set vok [expr [lsearch -exact $versions($prod) \
[FormData version]] >= 0]
set cok [expr [lsearch -exact $components($prod) \
[FormData component]] >= 0]
if {!$vok || !$cok} {
puts "<H1>Changing product means changing version and component.</H1>"
puts "You have chosen a new product, and now the version and/or"
puts "component fields are not correct. Please set them now.<p>"
puts "<form>"
puts "<table>"
puts "<tr>"
puts "<td align=right><b>Product:</b></td>"
puts "<td>$prod</td>"
puts "</tr><tr>"
puts "<td align=right><b>Version:</b></td>"
puts "<td>[Version_element [FormData version] $prod]</td>"
puts "</tr><tr>"
puts "<td align=right><b>Component:</b></td>"
puts "<td>[Component_element [FormData component] $prod]</td>"
puts "</tr>"
puts "</table>"
foreach i [array names FORM] {
if {[lsearch -exact {version component} $i] < 0} {
puts "<input type=hidden name=$i value=\"[value_quote $FORM($i)]\">"
}
}
puts "<input type=submit value=Commit>"
puts "</form>"
puts "</hr>"
puts "<a href=query.cgi>Cancel all this and go back to the query page.</a>"
exit
}
}
if {[info exists FORM(id)]} {
set idlist $FORM(id)
} else {
set idlist {}
foreach i [array names FORM] {
if {[string match "id_*" $i]} {
lappend idlist [crange $i 3 end]
}
}
}
if {![info exists FORM(who)]} {
set FORM(who) $COOKIE(Bugzilla_login)
}
puts "<TITLE>Update Bug $idlist</TITLE>"
if {[info exists FORM(id)]} {
navigation_header
}
puts "<HR>"
set query "update bugs\nset"
set comma ""
umask 0
proc DoComma {} {
global query comma
append query "$comma\n "
set comma ","
}
proc ChangeStatus {str} {
global dontchange query
if {![cequal $str $dontchange]} {
DoComma
append query "bug_status = '$str'"
}
}
proc ChangeResolution {str} {
global dontchange query
if {![cequal $str $dontchange]} {
DoComma
append query "resolution = '$str'"
}
}
foreach field {rep_platform priority bug_severity url summary \
component bug_file_loc short_desc \
status_summary product version component} {
if {[info exists FORM($field)]} {
if {![cequal $FORM($field) $dontchange]} {
DoComma
regsub -all "'" [FormData $field] "''" value
append query "$field = '$value'"
}
}
}
ConnectToDatabase
switch -exact $FORM(knob) {
none {}
accept {
ChangeStatus ASSIGNED
}
clearresolution {
ChangeResolution {}
}
resolve {
ChangeStatus RESOLVED
ChangeResolution $FORM(resolution)
}
reassign {
ChangeStatus NEW
DoComma
set newid [DBNameToIdAndCheck $FORM(assigned_to)]
append query "assigned_to = $newid"
}
reassignbycomponent {
if {[cequal $FORM(component) $dontchange]} {
puts "You must specify a component whose owner should get assigned"
puts "these bugs."
exit 0
}
ChangeStatus NEW
DoComma
SendSQL "select initialowner from components
where program='[SqlQuote $FORM(product)]'
and value='[SqlQuote $FORM(component)]'"
set newname [lindex [FetchSQLData] 0]
set newid [DBNameToIdAndCheck $newname 1]
append query "assigned_to = $newid"
}
reopen {
ChangeStatus REOPENED
}
verify {
ChangeStatus VERIFIED
}
close {
ChangeStatus CLOSED
}
duplicate {
ChangeStatus RESOLVED
ChangeResolution DUPLICATE
set num $FORM(dup_id)
if {[catch {incr num}]} {
puts "You must specify a bug number of which this bug is a"
puts "duplicate. The bug has not been changed."
exit
}
if {$FORM(dup_id) == $FORM(id)} {
puts "Nice try. But it doesn't really make sense to mark a bug as"
puts "a duplicate of itself, does it?"
exit
}
AppendComment $FORM(dup_id) $FORM(who) "*** Bug $FORM(id) has been marked as a duplicate of this bug. ***"
append FORM(comment) "\n\n*** This bug has been marked as a duplicate of $FORM(dup_id) ***"
exec ./processmail $FORM(dup_id) < /dev/null > /dev/null 2> /dev/null &
}
default {
puts "Unknown action $FORM(knob)!"
exit
}
}
if {[lempty $idlist]} {
puts "You apparently didn't choose any bugs to modify."
puts "<p>Click <b>Back</b> and try again."
exit
}
if {[cequal $comma ""]} {
set comment {}
if {[info exists FORM(comment)]} {
set comment $FORM(comment)
}
if {[cequal $comment ""]} {
puts "Um, you apparently did not change anything on the selected bugs."
puts "<p>Click <b>Back</b> and try again."
exit
}
}
set basequery $query
proc SnapShotBug {id} {
global log_columns
SendSQL "select [join $log_columns ","] from bugs where bug_id = $id"
return [FetchSQLData]
}
foreach id $idlist {
SendSQL "lock tables bugs write, bugs_activity write, cc write, profiles write"
set oldvalues [SnapShotBug $id]
set query "$basequery\nwhere bug_id = $id"
# puts "<PRE>$query</PRE>"
if {![cequal $comma ""]} {
if { [SendSQL $query] != 0 } {
puts "<H1>Error -- Changes not applied</H1>"
puts "OK, the database rejected the changes for some reason"
puts "which bugzilla can't deal with. The error string returned"
puts "was:<PRE>$oramsg(errortxt)</PRE>"
puts "Here is the query which caused the error:"
puts "<PRE>$query</PRE>"
}
while {[MoreSQLData]} {
FetchSQLData
}
}
if {[info exists FORM(comment)]} {
AppendComment $id $FORM(who) [FormData comment]
}
if {[info exists FORM(cc)] && [ShowCcList $id] != [lookup FORM cc]} {
set ccids(zz) 1
unset ccids(zz)
foreach person [split $FORM(cc) " ,"] {
if {![cequal $person ""]} {
set id [DBNameToIdAndCheck $person]
set ccids($id) 1
}
}
SendSQL "delete from cc where bug_id = $id"
while {[MoreSQLData]} { FetchSQLData }
foreach ccid [array names ccids] {
SendSQL "insert into cc (bug_id, who) values ($id, $ccid)"
while { [ MoreSQLData ] } { FetchSQLData }
}
}
# oracommit $lhandle
set newvalues [SnapShotBug $id]
foreach col $log_columns {
set old [lvarpop oldvalues]
set new [lvarpop newvalues]
if {![cequal $old $new]} {
if {![info exists whoid]} {
set whoid [DBNameToIdAndCheck $FORM(who)]
SendSQL "select delta_ts from bugs where bug_id = $id"
set timestamp [lindex [FetchSQLData] 0]
}
if {[cequal $col assigned_to]} {
set old [DBID_to_name $old]
set new [DBID_to_name $new]
}
set q "insert into bugs_activity (bug_id,who,when,field,oldvalue,newvalue) values ($id,$whoid,$timestamp,'[SqlQuote $col]','[SqlQuote $old]','[SqlQuote $new]')"
# puts "<pre>$q</pre>"
SendSQL $q
}
}
puts "<TABLE BORDER=1><TD><H1>Changes Submitted</H1>"
puts "<TD><A HREF=\"show_bug.cgi?id=$id\">Back To BUG# $id</A></TABLE>"
flush stdout
SendSQL "unlock tables"
exec ./processmail $id < /dev/null > /dev/null 2> /dev/null &
}
if {[info exists next_bug]} {
set FORM(id) $next_bug
puts "<HR>"
navigation_header
source "bug_form.tcl"
} else {
puts "<BR><A HREF=\"query.cgi\">Back To Query Page</A>"
}
#! /usr/bonsaitools/bin/mysqltcl
# -*- Mode: tcl; indent-tabs-mode: nil -*-
#
# The contents of this file are subject to the Mozilla Public License
# Version 1.0 (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>
# To recreate the shadow database, nuke all the entires and then run
# processmail regenerate <last>, where <last> is the biggest bug number
# currently used.
source "globals.tcl"
umask 0
proc Different {file1 file2} {
if {[file size $file1] != [file size $file2]} {
return 1
}
set f1 [open $file1 "r"]
set f2 [open $file2 "r"]
set d1 [read $f1]
set d2 [read $f2]
close $f1
close $f2
return [expr ![cequal $d1 $d2]]
}
proc DescCC {cclist} {
if {[lempty $cclist]} return ""
return "Cc: [join $cclist ", "]\n"
}
proc DescFixVersion {v} {
if {[cequal $v ""]} return ""
return "Fix-Version: $v\n"
}
proc GetBugText {id} {
global bug
catch {unset bug}
set query "
select
bug_id,
product,
version,
rep_platform,
op_sys,
bug_status,
resolution,
priority,
bug_severity,
area,
assigned_to,
reporter,
bug_file_loc,
target_fix_version,
short_desc,
component
from bugs
where bug_id = $id";
SendSQL $query
set ret [FetchSQLData]
if {$ret == ""} {
return ""
}
set count 0
foreach field { bug_id product version rep_platform op_sys bug_status
resolution priority bug_severity area assigned_to
reporter bug_file_loc target_fix_version short_desc
component } {
set bug($field) [lindex $ret $count]
incr count
}
set bug(assigned_to) [DBID_to_name $bug(assigned_to)]
set bug(reporter) [DBID_to_name $bug(reporter)]
set bug(long_desc) [GetLongDescription $id]
set bug(cclist) [split [ShowCcList $id] ","]
return "Bug\#: $id
Product: $bug(product)
Version: $bug(version)
Platform: $bug(rep_platform)
OS/Version: $bug(op_sys)
Status: $bug(bug_status)
Resolution: $bug(resolution)
Severity: $bug(bug_severity)
Priority: $bug(priority)
Component: $bug(component)
Area: $bug(area)
AssignedTo: $bug(assigned_to)
ReportedBy: $bug(reporter)
URL: $bug(bug_file_loc)
[DescCC $bug(cclist)][DescFixVersion $bug(target_fix_version)]Summary: $bug(short_desc)
$bug(long_desc)"
}
proc fixaddresses {list} {
global nomail
set result {}
foreach i [lrmdups $list] {
if {![info exists nomail($i)]} {
lappend result $i
}
}
return [join $result ", "]
}
proc Log {str} {
set lockfid [open "maillock" "w"]
flock -write $lockfid
set fid [open "maillog" "a"]
puts $fid "[fmtclock [getclock] "%D %H:%M"] $str"
close $fid
close $lockfid
}
set COOKIE(Bugzilla_login) terry
set COOKIE(Bugzilla_password) terry
ConnectToDatabase
set template "From: bugzilla-daemon
To: terry@netscape.com
X-Real-To: %s
X-Real-Cc: %s
Subject: \[Bug %s\] %s - %s
http://bugzilla.mozilla.org/bugzilla/show_bug.cgi?id=%s
%s"
set lockfid [open "maillock" "r"]
flock -read $lockfid
# foreach i [split [read_file -nonewline "okmail"] "\n"] {
# set okmail($i) 1
# }
foreach i [split [read_file -nonewline "nomail"] "\n"] {
if {[info exists okmail($i)]} {
unset okmail($i)
}
set nomail($i) 1
}
close $lockfid
set regenerate 0
if {[cequal [lindex $argv 0] "regenerate"]} {
set regenerate 1
set last [lindex $argv 1]
set argv ""
loop i 1 [expr $last + 1] {
lappend argv $i
}
}
foreach i $argv {
if {[lempty $i]} continue
set old shadow/$i
set new shadow/$i.tmp.[id process]
set diffs shadow/$i.diffs.[id process]
set verb "Changed"
if {![file exists $old]} {
close [open $old "w"]
set verb "New"
}
set text [GetBugText $i]
if {$text == ""} {
if {$regenerate} {
continue
}
error "Couldn't find bug $i."
}
set fid [open $new "w"]
puts $fid $text
close $fid
if {[Different $old $new]} {
catch {exec diff -c $old $new > $diffs}
set tolist [fixaddresses [list $bug(assigned_to) $bug(reporter)]]
set cclist [fixaddresses $bug(cclist)]
set logstr "Bug $i changed"
if {![lempty $tolist] || ![lempty $cclist]} {
set msg [format $template $tolist $cclist $i $verb \
$bug(short_desc) $i [read_file $diffs]]
if {!$regenerate || ![cequal $verb "New"]} {
exec /usr/lib/sendmail -t << $msg
set logstr "$logstr; mail sent to $tolist $cclist"
}
}
unlink $diffs
Log $logstr
}
frename $new $old
catch {chmod 0666 $old}
if {$regenerate} {
puts -nonewline "$i "
}
}
exit
#! /usr/bonsaitools/bin/mysqltcl
# -*- Mode: tcl; indent-tabs-mode: nil -*-
#
# The contents of this file are subject to the Mozilla Public License
# Version 1.0 (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>
source "CGI.tcl"
if {[catch {
if {[info exists FORM(GoAheadAndLogIn)]} {
# We got here from a login page, probably from relogin.cgi. We better
# make sure the password is legit.
confirm_login
}
if {![info exists COOKIE(DEFAULTQUERY)]} {
set COOKIE(DEFAULTQUERY) "bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&product=Communicator&order=%22Importance%22"
}
if {![info exists buffer] || $buffer == ""} {
set buffer $COOKIE(DEFAULTQUERY)
}
foreach name {bug_status resolution assigned_to rep_platform priority \
bug_severity product reporter op_sys component \
version} {
set default($name) ""
set type($name) 0
}
foreach item [split $buffer "&"] {
set el [ split $item = ]
set value [url_decode [lindex $el 1]]
set name [lindex $el 0]
if {[info exists default($name)]} {
if {$default($name) != ""} {
append default($name) "|$value"
set type($name) 1
} else {
set default($name) $value
}
}
}
foreach i [lsort [array names COOKIE]] {
switch -glob $i {
QUERY_* {
if {$COOKIE($i) != ""} {
set name [crange $i 6 end]
append namelist "<OPTION>$name"
}
}
}
}
puts "Set-Cookie: BUGLIST=
Content-type: text/html\n"
GetVersionTable
set who [GeneratePeopleInput assigned_to $default(assigned_to)]
set reporter [GeneratePeopleInput reporter $default(reporter)]
set qa_assigned_to_who [GeneratePeopleInput qa_assigned_to ""]
# Muck the "legal product" list so that the default one is always first (and
# is therefore visibly selected.
# Commented out, until we actually have enough products for this to matter.
# set w [lsearch $legal_product $default(product)]
# if {$w >= 0} {
# set legal_product [concat $default(product) [lreplace $legal_product $w $w]]
# }
PutHeader "Bugzilla Query Page" "Query Page"
puts "
<FORM NAME=queryForm METHOD=GET ACTION=\"buglist.cgi\">
<table>
<tr>
<th align=left><A HREF=\"bug_status.html\">Status</a>:</th>
<th align=left><A HREF=\"bug_status.html\">Resolution</a>:</th>
<th align=left><A HREF=\"bug_status.html#rep_platform\">Platform</a>:</th>
<th align=left><A HREF=\"bug_status.html#priority\">Priority</a>:</th>
<th align=left><A HREF=\"bug_status.html#severity\">Severity</a>:</th>
</tr>
<tr>
<td align=left valign=top>
<SELECT NAME=\"bug_status\" MULTIPLE SIZE=7>
[make_options $legal_bug_status $default(bug_status) $type(bug_status)]
</SELECT>
</td>
<td align=left valign=top>
<SELECT NAME=\"resolution\" MULTIPLE SIZE=7>
[make_options $legal_resolution $default(resolution) $type(resolution)]
</SELECT>
</td>
<td align=left valign=top>
<SELECT NAME=\"rep_platform\" MULTIPLE SIZE=7>
[make_options $legal_platform $default(rep_platform) $type(rep_platform)]
</SELECT>
</td>
<td align=left valign=top>
<SELECT NAME=\"priority\" MULTIPLE SIZE=7>
[make_options $legal_priority $default(priority) $type(priority) ]
</SELECT>
</td>
<td align=left valign=top>
<SELECT NAME=\"bug_severity\" MULTIPLE SIZE=7>
[make_options $legal_severity $default(bug_severity) $type(bug_severity)]
</SELECT>
</tr>
</table>
<p>
<TABLE>
<TR><TD ALIGN=RIGHT><B><A HREF=\"bug_status.html#assigned_to\">Assigned To:</a></B><TD>$who
<p>
<TR><TD ALIGN=RIGHT><B>Reporter:</B><TD>$reporter
</TABLE>
<NOBR>Changed in the last <INPUT NAME=changedin SIZE=2> days.</NOBR>
<P>
<table>
<tr>
<TH ALIGN=LEFT>Program:</th>
<TH ALIGN=LEFT>Version:</th>
<TH ALIGN=LEFT>Component:</th>
</tr>
<tr>
<td align=left valign=top>
<SELECT NAME=\"product\" MULTIPLE SIZE=5>
[make_options $legal_product $default(product) $type(product)]
</SELECT>
</td>
<td align=left valign=top>
<SELECT NAME=\"version\" MULTIPLE SIZE=5>
[make_options $legal_versions $default(version) $type(version)]
</SELECT>
</td>
<td align=left valign=top>
<SELECT NAME=\"component\" MULTIPLE SIZE=5>
[make_options $legal_components $default(component) $type(component)]
</SELECT>
</td>
</tr>
</table>
<table border=0><tr><td align=right>
<b><A HREF=\"bug_status.html#resolved_ts\">Date Resolved</a>:</b> </td>
<td align=left><INPUT NAME=resolved_ts SIZE=9> (to <INPUT NAME=resolved_ts_2 SIZE=9>, optional)</td>
</tr>
<tr>
<td align=right><b><A HREF=\"bug_status.html#resolved_ts\">Date Verified</a>:</b> </td>
<td align=left><INPUT NAME=verified_ts SIZE=9> (to <INPUT NAME=verified_ts_2 SIZE=9>, optional)
<font size=-1>&nbsp;&nbsp;date format: 24-FEB-98</font>
</td>
</tr>
</table>
<p>
<BR>
<INPUT TYPE=radio NAME=cmdtype VALUE=doit CHECKED> Run this query
<BR>"
if {[info exists namelist]} {
puts "
<table cellspacing=0 cellpadding=0><tr>
<td><INPUT TYPE=radio NAME=cmdtype VALUE=editnamed> Load the remembered query:</td>
<td rowspan=3><select name=namedcmd>$namelist</select>
</tr><tr>
<td><INPUT TYPE=radio NAME=cmdtype VALUE=runnamed> Run the remembered query:</td>
</tr><tr>
<td><INPUT TYPE=radio NAME=cmdtype VALUE=forgetnamed> Forget the remembered query:</td>
</tr></table>"
}
puts "
<INPUT TYPE=radio NAME=cmdtype VALUE=asdefault> Remember this as the default query
<BR>
<INPUT TYPE=radio NAME=cmdtype VALUE=asnamed> Remember this query, and name it:
<INPUT TYPE=text NAME=newqueryname>
<BR>
<NOBR><B>Sort By:</B>
<SELECT NAME=\"order\">
<OPTION>Bug Number
<OPTION SELECTED>\"Importance\"
<OPTION>Assignee
</SELECT></NOBR>
<INPUT TYPE=\"submit\" VALUE=\"Submit\">
<INPUT TYPE=\"reset\" VALUE=\"Reset back to the default query\">
<INPUT TYPE=hidden name=form_name VALUE=query>
<BR>Give me a <A HREF=\"help.html\">clue</A> about how to use this form.
</CENTER>
</FORM>
"
if {[info exists COOKIE(Bugzilla_login)]} {
puts "
<a href=relogin.cgi>Log in as someone besides <b>$COOKIE(Bugzilla_login)</b></a><br>
<a href=changepassword.cgi>Change my password.</a><br>"
}
puts "<a href=\"enter_bug.cgi\">Create a new bug.</a><br>"
}]} {
puts "\n\nQuery Page Error\n$errorInfo"
# exec /usr/lib/sendmail -t << "To: terry\n\n$errorInfo\n"
}
#! /usr/bonsaitools/bin/mysqltcl
# -*- Mode: tcl; indent-tabs-mode: nil -*-
#
# The contents of this file are subject to the Mozilla Public License
# Version 1.0 (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>
source CGI.tcl
puts "Set-Cookie: Bugzilla_login= ; path=/; expires=Sun, 30-Jun-80 00:00:00 GMT
Set-Cookie: Bugzilla_password= ; path=/; expires=Sun, 30-Jun-80 00:00:00 GMT
Content-type: text/html
<H1>Your login has been forgotten.</H1>
The cookie that was remembering your login is now gone. The next time you
do an action that requires a login, you will be prompted for it.
<p>
<a href=query.cgi>Back to the query page.</a>
"
exit
# The below was a different way, that prompted you for a login right then.
catch {unset COOKIE(Bugzilla_login)}
catch {unset COOKIE(Bugzilla_password)}
confirm_login
puts "Content-type: text/html\n"
puts "<H1>OK, logged in.</H1>"
puts "You are now logged in as <b>$COOKIE(Bugzilla_login)</b>."
puts "<p>"
puts "<a href=query.cgi>Back to the query page.</a>"
#! /usr/bonsaitools/bin/mysqltcl
# -*- Mode: tcl; indent-tabs-mode: nil -*-
#
# The contents of this file are subject to the Mozilla Public License
# Version 1.0 (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>
source "CGI.tcl"
puts "Content-type: text/html\n"
puts "<HTML>
<H1>Changes made to bug $FORM(id)</H1>
"
set query "
select bugs_activity.field, bugs_activity.when,
bugs_activity.oldvalue, bugs_activity.newvalue,
profiles.login_name
from bugs_activity,profiles
where bugs_activity.bug_id = $FORM(id)
and profiles.userid = bugs_activity.who
order by bugs_activity.when"
ConnectToDatabase
SendSQL $query
puts "<table border cellpadding=4>"
puts "<tr>"
puts " <th>Who</th><th>What</th><th>Old value</th><th>New value</th><th>When</th>"
puts "</tr>"
while { [MoreSQLData] } {
set value [FetchSQLData]
lassign $value field when old new who
puts "<tr>"
puts "<td>$who</td>"
puts "<td>$field</td>"
puts "<td>[value_quote $old]</td>"
puts "<td>[value_quote $new]</td>"
puts "<td>$when</td>"
puts "</tr>"
}
puts "</table>"
puts "<hr><a href=show_bug.cgi?id=$FORM(id)>Back to bug $FORM(id)</a>"
#! /usr/bonsaitools/bin/mysqltcl
# -*- Mode: tcl; indent-tabs-mode: nil -*-
#
# The contents of this file are subject to the Mozilla Public License
# Version 1.0 (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>
source "CGI.tcl"
puts "Content-type: text/html"
puts ""
if {[lookup FORM id] == ""} {
puts "<H2>Search By Bug Number</H2>"
puts "<FORM METHOD=GET ACTION=\"show_bug.cgi\">"
puts "You may find a single bug by entering its bug id here: "
puts "<INPUT NAME=id>"
puts "<INPUT TYPE=\"submit\" VALUE=\"Show Me This Bug\">"
puts "</FORM>"
exit 0
}
ConnectToDatabase
GetVersionTable
PutHeader "Bugzilla bug $FORM(id)" "Bugzilla Bug" $FORM(id)
navigation_header
puts "<HR>"
source "bug_form.tcl"
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