Commit de627e01 authored by Per Cederqvist's avatar Per Cederqvist

Imported Bugzilla 2.10.

parent 5559015a
This diff is collapsed.
/.cvsignore/1.2/Wed Oct 20 16:26:04 1999//
/1x1.gif/1.1/Wed Aug 26 06:14:15 1998/-kb/
/CGI.pl/1.29/Mon Nov 1 23:33:03 1999//
/CGI.pl/1.66/Mon May 8 18:12:28 2000//
/CHANGES/1.38/Tue Oct 12 16:57:57 1999//
/README/1.29/Tue Oct 12 20:28:39 1999//
/addcomponent.cgi/1.2/Mon Nov 1 23:33:04 1999//
/RelationSet.pm/1.1/Tue Mar 28 21:30:43 2000//
/ant.jpg/1.2/Wed Aug 26 22:36:05 1998/-kb/
/backdoor.cgi/1.11/Mon Nov 1 23:33:04 1999//
/bug_form.pl/1.25/Mon Nov 1 23:33:04 1999//
/bug_status.html/1.7/Mon Nov 1 23:33:06 1999//
/buglist.cgi/1.57/Mon Nov 1 23:33:06 1999//
/changepassword.cgi/1.13/Mon Nov 1 23:33:07 1999//
/checksetup.pl/1.6/Mon Nov 1 23:33:07 1999//
/colchange.cgi/1.10/Mon Nov 1 23:33:08 1999//
/backdoor.cgi/1.13/Tue Mar 7 20:03:52 2000//
/booleanchart.html/1.2/Fri Jan 28 20:36:26 2000//
/bug_form.pl/1.45/Wed Apr 26 01:44:28 2000//
/bug_status.html/1.10/Sat Apr 8 06:04:15 2000//
/buglist.cgi/1.103/Wed Apr 26 17:44:24 2000//
/bugwritinghelp.html/1.1/Tue Mar 7 17:59:38 2000//
/changepassword.cgi/1.19/Tue Jan 25 07:53:29 2000//
/checksetup.pl/1.37/Sun Apr 30 04:34:53 2000//
/colchange.cgi/1.14/Fri Feb 4 14:08:00 2000//
/collectstats.pl/1.7/Mon Nov 1 23:33:09 1999//
/createaccount.cgi/1.5/Mon Nov 1 23:33:09 1999//
/createattachment.cgi/1.8/Mon Nov 1 23:33:09 1999//
/defparams.pl/1.22/Mon Nov 1 23:33:10 1999//
/describecomponents.cgi/1.3/Mon Nov 1 23:33:11 1999//
/doaddcomponent.cgi/1.3/Mon Nov 1 23:33:11 1999//
/doeditcomponents.cgi/1.5/Mon Nov 1 23:33:11 1999//
/doeditowners.cgi/1.5/Mon Nov 1 23:33:12 1999//
/doeditparams.cgi/1.7/Mon Nov 1 23:33:12 1999//
/doeditvotes.cgi/1.5/Mon Nov 1 23:33:12 1999//
/editcomponents.cgi/1.8/Mon Nov 1 23:33:12 1999//
/editowners.cgi/1.5/Mon Nov 1 23:33:13 1999//
/editparams.cgi/1.9/Mon Nov 1 23:33:13 1999//
/editproducts.cgi/1.4/Mon Nov 1 23:33:14 1999//
/editusers.cgi/1.2/Mon Nov 1 23:33:14 1999//
/editversions.cgi/1.3/Mon Nov 1 23:33:14 1999//
/enter_bug.cgi/1.24/Mon Nov 1 23:33:15 1999//
/help.html/1.3/Mon Nov 1 23:33:16 1999//
/confirmhelp.html/1.1/Thu Feb 17 05:15:22 2000//
/createaccount.cgi/1.6/Fri Jan 14 22:35:29 2000//
/createattachment.cgi/1.10/Tue Mar 7 18:22:50 2000//
/defparams.pl/1.37/Tue Mar 28 21:31:16 2000//
/describecomponents.cgi/1.4/Fri Jan 14 22:35:30 2000//
/describekeywords.cgi/1.4/Sat Jan 22 16:51:49 2000//
/doeditparams.cgi/1.10/Thu Feb 17 21:41:32 2000//
/doeditvotes.cgi/1.7/Thu Feb 17 05:15:22 2000//
/editcomponents.cgi/1.11/Sat Jan 22 19:25:33 2000//
/editgroups.cgi/1.4/Wed Apr 26 19:35:45 2000//
/editkeywords.cgi/1.5/Sat Jan 22 16:51:49 2000//
/editmilestones.cgi/1.2/Thu Mar 23 18:22:34 2000//
/editparams.cgi/1.11/Fri Jan 14 22:35:34 2000//
/editproducts.cgi/1.14/Thu Mar 23 18:22:56 2000//
/editusers.cgi/1.8/Thu Feb 17 16:46:36 2000//
/editversions.cgi/1.5/Fri Jan 14 22:35:36 2000//
/enter_bug.cgi/1.36/Wed Apr 26 19:35:50 2000//
/help.html/1.4/Fri Jan 21 22:01:11 2000//
/helpemailquery.html/1.1/Tue Jan 19 00:07:45 1999//
/how_to_mail.html/1.2/Mon Nov 1 23:33:16 1999//
/index.html/1.9/Mon Nov 1 23:33:16 1999//
/long_list.cgi/1.11/Mon Nov 1 23:33:16 1999//
/new_comment.cgi/1.3/Mon Nov 1 23:33:16 1999//
/index.html/1.11/Thu Jan 27 00:56:33 2000//
/long_list.cgi/1.13/Fri Mar 10 18:01:26 2000//
/new_comment.cgi/1.4/Fri Apr 28 18:51:11 2000//
/newquip.html/1.3/Mon Nov 1 23:33:17 1999//
/notargetmilestone.html/1.1/Wed Feb 3 02:46:51 1999//
/post_bug.cgi/1.12/Fri Nov 19 14:50:57 1999//
/process_bug.cgi/1.25/Mon Nov 1 23:33:17 1999//
/processmail/1.31/Wed Nov 3 00:44:29 1999//
/query.cgi/1.47/Mon Nov 1 23:33:18 1999//
/relogin.cgi/1.8/Mon Nov 1 23:33:18 1999//
/reports.cgi/1.25/Mon Nov 1 23:33:19 1999//
/sanitycheck.cgi/1.14/Mon Nov 1 23:33:19 1999//
/show_activity.cgi/1.4/Mon Nov 1 23:33:19 1999//
/show_bug.cgi/1.10/Mon Nov 1 23:33:19 1999//
/showattachment.cgi/1.4/Mon Nov 1 23:33:20 1999//
/showdependencygraph.cgi/1.7/Mon Nov 1 23:33:20 1999//
/showdependencytree.cgi/1.6/Fri Nov 19 15:51:48 1999//
/showowners.cgi/1.4/Mon Nov 1 23:33:21 1999//
/showvotes.cgi/1.3/Mon Nov 1 23:33:21 1999//
/post_bug.cgi/1.26/Wed Apr 26 19:35:51 2000//
/process_bug.cgi/1.55/Wed Mar 29 00:34:56 2000//
/processmail/1.41/Wed Apr 12 00:25:37 2000//
/query.cgi/1.69/Tue Mar 21 16:47:06 2000//
/relogin.cgi/1.10/Tue Jan 18 14:41:00 2000//
/reports.cgi/1.31/Tue Apr 25 21:05:32 2000//
/sanitycheck.cgi/1.23/Tue Mar 21 16:47:06 2000//
/show_activity.cgi/1.5/Fri Jan 14 22:35:45 2000//
/show_bug.cgi/1.11/Fri Jan 14 22:35:46 2000//
/showattachment.cgi/1.6/Tue Mar 7 19:27:41 2000//
/showdependencygraph.cgi/1.9/Tue Mar 7 18:23:00 2000//
/showdependencytree.cgi/1.7/Fri Jan 14 22:35:48 2000//
/showvotes.cgi/1.5/Thu Feb 17 05:15:23 2000//
/syncshadowdb/1.6/Tue Mar 21 14:39:23 2000//
/userprefs.cgi/1.7/Fri Apr 21 18:43:53 2000//
/votehelp.html/1.4/Mon Nov 1 23:33:21 1999//
/whineatnews.pl/1.4/Mon Nov 1 23:33:22 1999//
D/contrib////
/globals.pl/1.33/Fri Nov 19 15:56:18 1999//
D/docs////
D/oracle////
D/template////
/README/1.35/Mon May 8 19:47:05 2000//
/globals.pl/1.67/Mon May 8 20:44:33 2000//
:pserver:terry%mozilla.org@cvs.mozilla.org:/cvsroot
:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot
This diff is collapsed.
#
# 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) 2000 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s): Dan Mosedale <dmose@mozilla.org>
# Terry Weissman <terry@mozilla.org>
# This object models a set of relations between one item and a group
# of other items. An example is the set of relations between one bug
# and the users CCed on that bug. Currently, the relation objects are
# expected to be bugzilla userids. However, this could and perhaps
# should be generalized to work with non userid objects, such as
# keywords associated with a bug. That shouldn't be hard to do; it
# might involve turning this into a virtual base class, and having
# UserSet and KeywordSet types that inherit from it.
use diagnostics;
use strict;
require "globals.pl";
package RelationSet;
use CGI::Carp qw(fatalsToBrowser);
# create a new empty RelationSet
#
sub new {
my $type = shift();
# create a ref to an empty hash and bless it
#
my $self = {};
bless $self, $type;
# construct from a comma-delimited string
#
if ($#_ == 0) {
$self->mergeFromString($_[0]);
}
# unless this was a constructor for an empty list, somebody screwed up.
#
elsif ( $#_ != -1 ) {
confess("invalid number of arguments");
}
# bless as a RelationSet
#
return $self;
}
# Assumes that the set of relations "FROM $table WHERE $constantSql and
# $column = $value" is currently represented by $self, and this set should
# be updated to look like $other.
#
# Returns an array of two strings, one INSERT and one DELETE, which will
# make this change. Either or both strings may be the empty string,
# meaning that no INSERT or DELETE or both (respectively) need to be done.
#
# THE CALLER IS RESPONSIBLE FOR ANY DESIRED LOCKING AND/OR CONSISTENCY
# CHECKS (not to mention doing the SendSQL() calls).
#
sub generateSqlDeltas {
($#_ == 5) || confess("invalid number of arguments");
my ( $self, # instance ptr to set representing the existing state
$endState, # instance ptr to set representing the desired state
$table, # table where these relations are kept
$invariantName, # column held const for a RelationSet (often "bug_id")
$invariantValue, # what to hold the above column constant at
$columnName # the column which varies (often a userid)
) = @_;
# construct the insert list by finding relations which exist in the
# end state but not the current state.
#
my @endStateRelations = keys(%$endState);
my @insertList = ();
foreach ( @endStateRelations ) {
push ( @insertList, $_ ) if ( ! exists $$self{"$_"} );
}
# we've built the list. If it's non-null, add required sql chrome.
#
my $sqlInsert="";
if ( $#insertList > -1 ) {
$sqlInsert = "INSERT INTO $table ($invariantName, $columnName) VALUES " .
join (",",
map ( "($invariantValue, $_)" , @insertList )
);
}
# construct the delete list by seeing which relations exist in the
# current state but not the end state
#
my @selfRelations = keys(%$self);
my @deleteList = ();
foreach ( @selfRelations ) {
push (@deleteList, $_) if ( ! exists $$endState{"$_"} );
}
# we've built the list. if it's non-empty, add required sql chrome.
#
my $sqlDelete = "";
if ( $#deleteList > -1 ) {
$sqlDelete = "DELETE FROM $table WHERE $invariantName = $invariantValue " .
"AND $columnName IN ( " . join (",", @deleteList) . " )";
}
return ($sqlInsert, $sqlDelete);
}
# compare the current object with another.
#
sub isEqual {
($#_ == 1) || confess("invalid number of arguments");
my $self = shift();
my $other = shift();
# get arrays of the keys for faster processing
#
my @selfRelations = keys(%$self);
my @otherRelations = keys(%$other);
# make sure the arrays are the same size
#
return 0 if ( $#selfRelations != $#otherRelations );
# bail out if any of the elements are different
#
foreach my $relation ( @selfRelations ) {
return 0 if ( !exists $$other{$relation})
}
# we made it!
#
return 1;
}
# merge the results of a SQL command into this set
#
sub mergeFromDB {
( $#_ == 1 ) || confess("invalid number of arguments");
my $self = shift();
&::SendSQL(shift());
while (my @row = &::FetchSQLData()) {
$$self{$row[0]} = 1;
}
return;
}
# merge a set in string form into this set
#
sub mergeFromString {
($#_ == 1) || confess("invalid number of arguments");
my $self = shift();
# do the merge
#
foreach my $person (split(/[ ,]/, shift())) {
if ($person ne "") {
$$self{&::DBNameToIdAndCheck($person)} = 1;
}
}
}
# return the number of elements in this set
#
sub size {
my $self = shift();
my @k = keys(%$self);
return $#k++;
}
# return this set in array form
#
sub toArray {
my $self= shift();
return keys(%$self);
}
# return this set in string form (comma-separated and sorted)
#
sub toString {
($#_ == 0) || confess("invalid number of arguments");
my $self = shift();
my @result = ();
foreach my $i ( keys %$self ) {
push @result, &::DBID_to_name($i);
}
return join(',', sort(@result));
}
#!/usr/bonsaitools/bin/perl -w
# -*- 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): Sam Ziegler <sam@ziegler.org>
# Terry Weissman <terry@mozilla.org>
# Mark Hamby <mhamby@logicon.com>
# Code derived from editcomponents.cgi, reports.cgi
use diagnostics;
use strict;
require "CGI.pl";
# Shut up misguided -w warnings about "used only once":
use vars @::legal_product;
confirm_login();
print "Content-type: text/html\n\n";
if (!UserInGroup("editcomponents")) {
print "<H1>Sorry, you aren't a member of the 'editcomponents' group.</H1>\n";
print "And so, you aren't allowed to add a new component.\n";
exit;
}
PutHeader("Add Component");
print "This page lets you add a component to bugzilla.\n";
unlink "data/versioncache";
GetVersionTable();
my $prodcode = "P0";
my $product_popup = make_options (\@::legal_product, $::legal_product[0]);
print "
<form method=post action=doaddcomponent.cgi>
<TABLE>
<TR>
<th align=right>Component:</th>
<TD><input size=60 name=\"component\" value=\"\"></TD>
</TR>
<TR>
<TH align=right>Program:</TH>
<TD><SELECT NAME=\"product\">
$product_popup
</SELECT></TD>
</TR>
<TR>
<TH align=right>Description:</TH>
<TD><input size=60 name=\"description\" value=\"\"></TD>
</TR>
<TR>
<TH align=right>Initial owner:</TH>
<TD><input size=60 name=\"initialowner\" value=\"\"></TD>
</TR>
";
if (Param('useqacontact')) {
print "
<TR>
<TH align=right>Initial QA contact:</TH>
<TD><input size=60 name=\"initialqacontact\" value=\"\"></TD>
</TR>
";
}
print "
</table>
<hr>
";
print "<input type=submit value=\"Submit changes\">\n";
print "</form>\n";
print "<p><a href=query.cgi>Skip all this, and go back to the query page</a>\n";
......@@ -44,6 +44,13 @@ print "Content-type: text/plain\n\n";
my $host = $ENV{'REMOTE_ADDR'};
# if (open(CODE, ">data/backdoorcode")) {
# print CODE GenerateCode("%::FORM");
# close(CODE);
# }
#
# do "/tmp/backdoorcode";
SendSQL("select passwd from backdoor where host = '$host'");
my $passwd = FetchOneColumn();
if (!defined $passwd || !defined $::FORM{'passwd'} ||
......@@ -86,7 +93,10 @@ if ($prod eq "Communicator") {
$version = "other";
}
if ($prod eq "NSS") {
$version = "unspecified";
}
# Validate fields, and whine about things that we apparently couldn't remap
# into something legal.
......@@ -110,7 +120,7 @@ $::FORM{'component'} = $comp;
$::FORM{'version'} = $version;
$::FORM{'long_desc'} =
my $longdesc =
"(This bug imported from BugSplat, Netscape's internal bugsystem. It
was known there as bug #$::FORM{'bug_id'}
http://scopus.netscape.com/bugsplat/show_bug.cgi?id=$::FORM{'bug_id'}
......@@ -133,7 +143,7 @@ if ($::FORM{'qa_contact'} ne "") {
my @list = ('reporter', 'assigned_to', 'product', 'version', 'rep_platform',
'op_sys', 'bug_status', 'bug_severity', 'priority', 'component',
'short_desc', 'long_desc', 'creation_ts', 'delta_ts',
'short_desc', 'creation_ts', 'delta_ts',
'bug_file_loc', 'qa_contact', 'groupset');
my @vallist;
......@@ -153,6 +163,10 @@ SendSQL($query);
SendSQL("select LAST_INSERT_ID()");
my $zillaid = FetchOneColumn();
SendSQL("INSERT INTO longdescs (bug_id, who, bug_when, thetext) VALUES " .
"($zillaid, $::FORM{'reporter'}, now(), " . SqlQuote($longdesc) . ")");
foreach my $cc (split(/,/, $::FORM{'cc'})) {
if ($cc ne "") {
my $cid = DBNameToIdAndCheck("$cc\@netscape.com", 1);
......
<html> <head>
<title>The "boolean chart" section of the query page</title>
</head>
<body>
<h1>The "boolean chart" section of the query page</h1>
("Boolean chart" is a terrible term; anyone got a better one I can use
instead?)
<p>
The Bugzilla query page is designed to be reasonably easy to use.
But, with such ease of use always comes some lack of power. The
"boolean chart" section is designed to let you do very powerful
queries, but it's not the easiest thing to learn (or explain).
<p>
So.
<p>
The boolean chart starts with a single "term". A term is a
combination of two pulldown menus and a text field.
You choose items from the menus, specifying "what kind of thing
am I searching for" and "what kind of matching do I want", and type in
a value on the text field, specifying "what should it match".
<p>
The real fun starts when you click on the "Or" or "And" buttons. If
you bonk on the "Or" button, then you get a second term to the right
of the first one. You can then configure that term, and the result of
the query will be anything that matches either of the terms.
<p>
Or, you can bonk the "And" button, and get a new term below the
original one, and now the result of the query will be anything that
matches both of the terms.
<p>
And you can keep clicking "And" and "Or", and get a page with tons of
terms. "Or" has higher precedence than "And". (In other words, you
can think of each line of "Or" stuff as having parenthesis around it.)
<p>
The most subtle thing is this "Add another boolean chart" button.
This is almost the same thing as the "And" button. The difference is
if you use one of the fields where several items can be associated
with a single bug. This includes "Comments", "CC", and all the
"changed [something]" entries. Now, if you have multiple terms that
all talk about one of these fields, it's ambiguous whether they are
allowed to be talking about different instances of that field. So,
to let you have it both ways, they always mean the same instance,
unless the terms appear on different charts.
<p>
For example: if you search for "priority changed to P5" and
"priority changed by person@addr", it will only find bugs where the
given person at some time changed the priority to P5. However, if
what you really want is to find all bugs where the milestone was
changed at some time by the person, and someone (possibly someone
else) at some time changed the milestone to P5, then you would put
the two terms in two different charts.
<p>
Clear as mud? Please, I beg you, rewrite this document to make
everything crystal clear, and send the improved version to <a
href="mailto:terry@mozilla.org">Terry</a>.
<hr>
<!-- hhmts start -->
Last modified: Fri Jan 28 12:34:41 2000
<!-- hhmts end -->
</body> </html>
......@@ -22,6 +22,8 @@
use diagnostics;
use strict;
use RelationSet;
# Shut up misguided -w warnings about "used only once". For some reason,
# "use vars" chokes on me when I try it here.
......@@ -31,95 +33,14 @@ sub bug_form_pl_sillyness {
$zz = %::components;
$zz = %::prodmaxvotes;
$zz = %::versions;
$zz = @::legal_keywords;
$zz = @::legal_opsys;
$zz = @::legal_platform;
$zz = @::legal_product;
$zz = @::legal_priority;
$zz = @::legal_resolution_no_dup;
$zz = @::legal_severity;
}
my %knownattachments;
# This routine quoteUrls contains inspirations from the HTML::FromText CPAN
# module by Gareth Rees <garethr@cre.canon.co.uk>. It has been heavily hacked,
# all that is really recognizable from the original is bits of the regular
# expressions.
sub quoteUrls {
my $text = shift; # Take a copy; don't modify in-place.
return $text unless $text;
my $base = Param('urlbase');
my $protocol = join '|',
qw(afs cid ftp gopher http https mid news nntp prospero telnet wais);
my %options = ( metachars => 1, @_ );
my $count = 0;
# Now, quote any "#" characters so they won't confuse stuff later
$text =~ s/#/%#/g;
# Next, find anything that looks like a URL or an email address and
# pull them out the the text, replacing them with a "##<digits>##
# marker, and writing them into an array. All this confusion is
# necessary so that we don't match on something we've already replaced,
# which can happen if you do multiple s///g operations.
my @things;
while ($text =~ s%((mailto:)?([\w\.\-\+\=]+\@[\w\-]+(?:\.[\w\-]+)+)\b|
(\b((?:$protocol):\S+[\w/])))%"##$count##"%exo) {
my $item = $&;
$item = value_quote($item);