Index: Bug.pm =================================================================== RCS file: /cvsroot/mozilla/webtools/bugzilla/Bug.pm,v retrieving revision 1.5 diff -c -r1.5 Bug.pm *** Bug.pm 2000/09/02 02:44:54 1.5 --- Bug.pm 2000/09/29 04:57:12 *************** *** 1,4 **** ! #!/usr/bonsaitools/bin/perl -w # -*- Mode: perl; indent-tabs-mode: nil -*- # # The contents of this file are subject to the Mozilla Public --- 1,4 ---- ! #!/usr/bin/perl -w # -*- Mode: perl; indent-tabs-mode: nil -*- # # The contents of this file are subject to the Mozilla Public *************** *** 11,17 **** # 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 --- 11,17 ---- # implied. See the License for the specific language governing # rights and limitations under the License. # ! # The Original Code is the Issuezilla Issue Tracking System. # # The Initial Developer of the Original Code is Netscape Communications # Corporation. Portions created by Netscape are *************** *** 29,82 **** use RelationSet; require "globals.pl"; require "CGI.pl"; ! package Bug; use CGI::Carp qw(fatalsToBrowser); my %ok_field; ! for my $key (qw (bug_id product version rep_platform op_sys bug_status ! resolution priority bug_severity component assigned_to ! reporter bug_file_loc short_desc target_milestone qa_contact status_whiteboard creation_ts groupset delta_ts votes whoid usergroupset comment query error) ){ $ok_field{$key}++; } ! # create a new empty bug # sub new { my $type = shift(); ! my %bug; # create a ref to an empty hash and bless it # ! my $self = {%bug}; bless $self, $type; ! # construct from a hash containing a bug's info # if ($#_ == 1) { ! $self->initBug(@_); } else { confess("invalid number of arguments \($#_\)($_)"); } ! # bless as a Bug # return $self; } ! # dump info about bug into hash unless user doesn't have permission # user_id 0 is used when person is not logged in. # ! sub initBug { my $self = shift(); ! my ($bug_id, $user_id) = (@_); ! if ( (! defined $bug_id) || (!$bug_id) ) { ! # no bug number given return {}; } --- 29,82 ---- use RelationSet; require "globals.pl"; require "CGI.pl"; ! package Issue; use CGI::Carp qw(fatalsToBrowser); my %ok_field; ! for my $key (qw (issue_id product version rep_platform op_sys issue_status ! resolution priority issue_type component assigned_to ! reporter issue_file_loc short_desc target_milestone qa_contact status_whiteboard creation_ts groupset delta_ts votes whoid usergroupset comment query error) ){ $ok_field{$key}++; } ! # create a new empty issue # sub new { my $type = shift(); ! my %issue; # create a ref to an empty hash and bless it # ! my $self = {%issue}; bless $self, $type; ! # construct from a hash containing an issue's info # if ($#_ == 1) { ! $self->initIssue(@_); } else { confess("invalid number of arguments \($#_\)($_)"); } ! # bless as an issue # return $self; } ! # dump info about issue into hash unless user doesn't have permission # user_id 0 is used when person is not logged in. # ! sub initIssue { my $self = shift(); ! my ($issue_id, $user_id) = (@_); ! if ( (! defined $issue_id) || (!$issue_id) ) { ! # no issue number given return {}; } *************** *** 106,120 **** my $query = " select ! bugs.bug_id, product, version, rep_platform, op_sys, bug_status, ! resolution, priority, bug_severity, component, assigned_to, reporter, ! bug_file_loc, short_desc, target_milestone, qa_contact, status_whiteboard, date_format(creation_ts,'%Y-%m-%d %H:%i'), groupset, delta_ts, sum(votes.count) ! from bugs left join votes using(bug_id) ! where bugs.bug_id = $bug_id ! and bugs.groupset & $usergroupset = bugs.groupset ! group by bugs.bug_id"; &::SendSQL($query); my @row; --- 106,120 ---- my $query = " select ! issues.issue_id, product, version, rep_platform, op_sys, issue_status, ! resolution, priority, issue_type, component, assigned_to, reporter, ! issue_file_loc, short_desc, target_milestone, qa_contact, status_whiteboard, date_format(creation_ts,'%Y-%m-%d %H:%i'), groupset, delta_ts, sum(votes.count) ! from issues left join votes using(issue_id) ! where issues.issue_id = $issue_id ! and issues.groupset & $usergroupset = issues.groupset ! group by issues.issue_id"; &::SendSQL($query); my @row; *************** *** 122,131 **** if (@row = &::FetchSQLData()) { my $count = 0; my %fields; ! foreach my $field ("bug_id", "product", "version", "rep_platform", ! "op_sys", "bug_status", "resolution", "priority", ! "bug_severity", "component", "assigned_to", "reporter", ! "bug_file_loc", "short_desc", "target_milestone", "qa_contact", "status_whiteboard", "creation_ts", "groupset", "delta_ts", "votes") { $fields{$field} = shift @row; --- 122,131 ---- if (@row = &::FetchSQLData()) { my $count = 0; my %fields; ! foreach my $field ("issue_id", "product", "version", "rep_platform", ! "op_sys", "issue_status", "resolution", "priority", ! "issue_type", "component", "assigned_to", "reporter", ! "issue_file_loc", "short_desc", "target_milestone", "qa_contact", "status_whiteboard", "creation_ts", "groupset", "delta_ts", "votes") { $fields{$field} = shift @row; *************** *** 135,147 **** $count++; } } else { ! &::SendSQL("select groupset from bugs where bug_id = $bug_id"); if (@row = &::FetchSQLData()) { ! $self->{'bug_id'} = $bug_id; $self->{'error'} = "NotPermitted"; return $self; } else { ! $self->{'bug_id'} = $bug_id; $self->{'error'} = "NotFound"; return $self; } --- 135,147 ---- $count++; } } else { ! &::SendSQL("select groupset from issues where issue_id = $issue_id"); if (@row = &::FetchSQLData()) { ! $self->{'issue_id'} = $issue_id; $self->{'error'} = "NotPermitted"; return $self; } else { ! $self->{'issue_id'} = $issue_id; $self->{'error'} = "NotFound"; return $self; } *************** *** 159,165 **** $self->{'reporter'} = &::DBID_to_name($self->{'reporter'}); my $ccSet = new RelationSet; ! $ccSet->mergeFromDB("select who from cc where bug_id=$bug_id"); my @cc = $ccSet->toArrayOfStrings(); if (@cc) { $self->{'cc'} = \@cc; --- 159,165 ---- $self->{'reporter'} = &::DBID_to_name($self->{'reporter'}); my $ccSet = new RelationSet; ! $ccSet->mergeFromDB("select who from cc where issue_id=$issue_id"); my @cc = $ccSet->toArrayOfStrings(); if (@cc) { $self->{'cc'} = \@cc; *************** *** 175,181 **** if (@::legal_keywords) { &::SendSQL("SELECT keyworddefs.name FROM keyworddefs, keywords ! WHERE keywords.bug_id = $bug_id AND keyworddefs.id = keywords.keywordid ORDER BY keyworddefs.name"); my @list; --- 175,181 ---- if (@::legal_keywords) { &::SendSQL("SELECT keyworddefs.name FROM keyworddefs, keywords ! WHERE keywords.issue_id = $issue_id AND keyworddefs.id = keywords.keywordid ORDER BY keyworddefs.name"); my @list; *************** *** 189,195 **** &::SendSQL("select attach_id, creation_ts, description from attachments ! where bug_id = $bug_id"); my @attachments; while (&::MoreSQLData()) { my ($attachid, $date, $desc) = (&::FetchSQLData()); --- 189,195 ---- &::SendSQL("select attach_id, creation_ts, description from attachments ! where issue_id = $issue_id"); my @attachments; while (&::MoreSQLData()) { my ($attachid, $date, $desc) = (&::FetchSQLData()); *************** *** 206,220 **** $self->{'attachments'} = \@attachments; } ! &::SendSQL("select bug_id, who, bug_when, thetext from longdescs ! where bug_id = $bug_id"); my @longdescs; while (&::MoreSQLData()) { ! my ($bug_id, $who, $bug_when, $thetext) = (&::FetchSQLData()); my %longdesc; $longdesc{'who'} = $who; ! $longdesc{'bug_when'} = $bug_when; $longdesc{'thetext'} = &::html_quote($thetext); push @longdescs, \%longdesc; } --- 206,220 ---- $self->{'attachments'} = \@attachments; } ! &::SendSQL("select issue_id, who, issue_when, thetext from longdescs ! where issue_id = $issue_id"); my @longdescs; while (&::MoreSQLData()) { ! my ($issue_id, $who, $issue_when, $thetext) = (&::FetchSQLData()); my %longdesc; $longdesc{'who'} = $who; ! $longdesc{'issue_when'} = $issue_when; $longdesc{'thetext'} = &::html_quote($thetext); push @longdescs, \%longdesc; } *************** *** 223,233 **** } if (&::Param("usedependencies")) { ! my @depends = EmitDependList("blocked", "dependson", $bug_id); if ( @depends ) { $self->{'dependson'} = \@depends; } ! my @blocks = EmitDependList("dependson", "blocked", $bug_id); if ( @blocks ) { $self->{'blocks'} = \@blocks; } --- 223,233 ---- } if (&::Param("usedependencies")) { ! my @depends = EmitDependList("blocked", "dependson", $issue_id); if ( @depends ) { $self->{'dependson'} = \@depends; } ! my @blocks = EmitDependList("dependson", "blocked", $issue_id); if ( @blocks ) { $self->{'blocks'} = \@blocks; } *************** *** 238,244 **** ! # given a bug hash, emit xml for it. with file header provided by caller # sub emitXML { ( $#_ == 0 ) || confess("invalid number of arguments"); --- 238,244 ---- ! # given an issue hash, emit xml for it. with file header provided by caller # sub emitXML { ( $#_ == 0 ) || confess("invalid number of arguments"); *************** *** 247,264 **** if (exists $self->{'error'}) { ! $xml .= "{'error'}\">\n"; ! $xml .= " $self->{'bug_id'}\n"; ! $xml .= "\n"; return $xml; } ! $xml .= "\n"; ! foreach my $field ("bug_id", "urlbase", "bug_status", "product", "priority", "version", "rep_platform", "assigned_to", "delta_ts", ! "component", "reporter", "target_milestone", "bug_severity", ! "creation_ts", "qa_contact", "op_sys", "resolution", "bug_file_loc", "short_desc", "keywords", "status_whiteboard") { if ($self->{$field}) { $xml .= " <$field>" . $self->{$field} . "\n"; --- 247,264 ---- if (exists $self->{'error'}) { ! $xml .= "{'error'}\">\n"; ! $xml .= " $self->{'issue_id'}\n"; ! $xml .= "\n"; return $xml; } ! $xml .= "\n"; ! foreach my $field ("issue_id", "urlbase", "issue_status", "product", "priority", "version", "rep_platform", "assigned_to", "delta_ts", ! "component", "reporter", "target_milestone", "issue_type", ! "creation_ts", "qa_contact", "op_sys", "resolution", "issue_file_loc", "short_desc", "keywords", "status_whiteboard") { if ($self->{$field}) { $xml .= " <$field>" . $self->{$field} . "\n"; *************** *** 278,285 **** $xml .= " \n"; $xml .= " " . &::DBID_to_name($self->{'longdescs'}[$i]->{'who'}) . "\n"; ! $xml .= " " . $self->{'longdescs'}[$i]->{'bug_when'} ! . "\n"; $xml .= " " . QuoteXMLChars($self->{'longdescs'}[$i]->{'thetext'}) . "\n"; $xml .= " \n"; --- 278,285 ---- $xml .= " \n"; $xml .= " " . &::DBID_to_name($self->{'longdescs'}[$i]->{'who'}) . "\n"; ! $xml .= " " . $self->{'longdescs'}[$i]->{'issue_when'} ! . "\n"; $xml .= " " . QuoteXMLChars($self->{'longdescs'}[$i]->{'thetext'}) . "\n"; $xml .= " \n"; *************** *** 299,315 **** } } ! $xml .= "\n"; return $xml; } sub EmitDependList { ! my ($myfield, $targetfield, $bug_id) = (@_); my @list; ! &::SendSQL("select dependencies.$targetfield, bugs.bug_status ! from dependencies, bugs ! where dependencies.$myfield = $bug_id ! and bugs.bug_id = dependencies.$targetfield order by dependencies.$targetfield"); while (&::MoreSQLData()) { my ($i, $stat) = (&::FetchSQLData()); --- 299,315 ---- } } ! $xml .= "\n"; return $xml; } sub EmitDependList { ! my ($myfield, $targetfield, $issue_id) = (@_); my @list; ! &::SendSQL("select dependencies.$targetfield, issues.issue_status ! from dependencies, issues ! where dependencies.$myfield = $issue_id ! and issues.issue_id = dependencies.$targetfield order by dependencies.$targetfield"); while (&::MoreSQLData()) { my ($i, $stat) = (&::FetchSQLData()); *************** *** 333,344 **** my $xml; $xml = "\n"; ! $xml .= "\n"; ! $xml .= "\n"; ! $xml .= "\n"; ! $xml .= "\n"); } sub UserInGroup { --- 350,356 ---- sub XML_Footer { ! return ("\n"); } sub UserInGroup { *************** *** 397,421 **** return 1; } if ($UserInEditGroupSet < 0) { ! $UserInEditGroupSet = UserInGroup($self, "editbugs"); } if ($UserInEditGroupSet) { return 1; } ! &::SendSQL("SELECT reporter, assigned_to, qa_contact FROM bugs " . ! "WHERE bug_id = $self->{'bug_id'}"); ($reporterid, $ownerid, $qacontactid) = (&::FetchSQLData()); ! # Let reporter change bug status, even if they can't edit bugs. ! # If reporter can't re-open their bug they will just file a duplicate. ! # While we're at it, let them close their own bugs as well. ! if ( ($f eq "bug_status") && ($self->{'whoid'} eq $reporterid) ) { return 1; } ! if ($f eq "bug_status" && $newvalue ne $::unconfirmedstate && &::IsOpenedState($newvalue)) { ! # Hmm. They are trying to set this bug to some opened state # that isn't the UNCONFIRMED state. Are they in the right # group? Or, has it ever been confirmed? If not, then this # isn't legal. --- 397,421 ---- return 1; } if ($UserInEditGroupSet < 0) { ! $UserInEditGroupSet = UserInGroup($self, "editissues"); } if ($UserInEditGroupSet) { return 1; } ! &::SendSQL("SELECT reporter, assigned_to, qa_contact FROM issues " . ! "WHERE issue_id = $self->{'issue_id'}"); ($reporterid, $ownerid, $qacontactid) = (&::FetchSQLData()); ! # Let reporter change issue status, even if they can't edit issues. ! # If reporter can't re-open their issue they will just file a duplicate. ! # While we're at it, let them close their own issues as well. ! if ( ($f eq "issue_status") && ($self->{'whoid'} eq $reporterid) ) { return 1; } ! if ($f eq "issue_status" && $newvalue ne $::unconfirmedstate && &::IsOpenedState($newvalue)) { ! # Hmm. They are trying to set this issue to some opened state # that isn't the UNCONFIRMED state. Are they in the right # group? Or, has it ever been confirmed? If not, then this # isn't legal. *************** *** 426,432 **** if ($UserInCanConfirmGroupSet) { return 1; } ! &::SendSQL("SELECT everconfirmed FROM bugs WHERE bug_id = $self->{'bug_id'}"); my $everconfirmed = FetchOneColumn(); if ($everconfirmed) { return 1; --- 426,432 ---- if ($UserInCanConfirmGroupSet) { return 1; } ! &::SendSQL("SELECT everconfirmed FROM issues WHERE issue_id = $self->{'issue_id'}"); my $everconfirmed = FetchOneColumn(); if ($everconfirmed) { return 1; *************** *** 436,442 **** return 1; } $self->{'error'} = " ! Only the owner or submitter of the bug, or a sufficiently empowered user, may make that change to the $f field." } --- 436,442 ---- return 1; } $self->{'error'} = " ! Only the owner or submitter of the issue, or a sufficiently empowered user, may make that change to the $f field." } *************** *** 444,454 **** my $self = shift(); my $write = "WRITE"; # Might want to make a param to control # whether we do LOW_PRIORITY ... ! &::SendSQL("LOCK TABLES bugs $write, bugs_activity $write, cc $write, " . "profiles $write, dependencies $write, votes $write, " . "keywords $write, longdescs $write, fielddefs $write, " . "keyworddefs READ, groups READ, attachments READ, products READ"); ! &::SendSQL("SELECT delta_ts FROM bugs where bug_id=$self->{'bug_id'}"); my $delta_ts = &::FetchOneColumn(); &::SendSQL("unlock tables"); if ($self->{'delta_ts'} ne $delta_ts) { --- 444,454 ---- my $self = shift(); my $write = "WRITE"; # Might want to make a param to control # whether we do LOW_PRIORITY ... ! &::SendSQL("LOCK TABLES issues $write, issues_activity $write, cc $write, " . "profiles $write, dependencies $write, votes $write, " . "keywords $write, longdescs $write, fielddefs $write, " . "keyworddefs READ, groups READ, attachments READ, products READ"); ! &::SendSQL("SELECT delta_ts FROM issues where issue_id=$self->{'issue_id'}"); my $delta_ts = &::FetchOneColumn(); &::SendSQL("unlock tables"); if ($self->{'delta_ts'} ne $delta_ts) { *************** *** 468,477 **** return; } ! &::SendSQL("INSERT INTO longdescs (bug_id, who, bug_when, thetext) " . ! "VALUES($self->{'bug_id'}, $self->{'whoid'}, now(), " . &::SqlQuote($comment) . ")"); ! &::SendSQL("UPDATE bugs SET delta_ts = now() WHERE bug_id = $self->{'bug_id'}"); } --- 468,477 ---- return; } ! &::SendSQL("INSERT INTO longdescs (issue_id, who, issue_when, thetext) " . ! "VALUES($self->{'issue_id'}, $self->{'whoid'}, now(), " . &::SqlQuote($comment) . ")"); ! &::SendSQL("UPDATE issues SET delta_ts = now() WHERE issue_id = $self->{'issue_id'}"); } *************** *** 491,497 **** sub CommitChanges { ! #snapshot bug #snapshot dependencies #check can change fields #check collision --- 491,497 ---- sub CommitChanges { ! #snapshot issue #snapshot dependencies #check can change fields #check collision *************** *** 512,518 **** $self->{$attr} = shift; return; } ! confess ("invalid bug attribute $attr") unless $ok_field{$attr}; if (defined $self->{$attr}) { return $self->{$attr}; } else { --- 512,518 ---- $self->{$attr} = shift; return; } ! confess ("invalid issue attribute $attr") unless $ok_field{$attr}; if (defined $self->{$attr}) { return $self->{$attr}; } else { Index: CGI.pl =================================================================== RCS file: /cvsroot/mozilla/webtools/bugzilla/CGI.pl,v retrieving revision 1.73 diff -c -r1.73 CGI.pl *** CGI.pl 2000/09/18 21:29:44 1.73 --- CGI.pl 2000/09/29 04:57:12 *************** *** 10,16 **** # 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 --- 10,16 ---- # implied. See the License for the specific language governing # rights and limitations under the License. # ! # The Original Code is the Issuezilla Issue Tracking System. # # The Initial Developer of the Original Code is Netscape Communications # Corporation. Portions created by Netscape are *************** *** 21,27 **** # Dan Mosedale # Joe Robins ! # Contains some global routines used throughout the CGI scripts of Bugzilla. use diagnostics; use strict; --- 21,27 ---- # Dan Mosedale # Joe Robins ! # Contains some global routines used throughout the CGI scripts of Issuezilla. use diagnostics; use strict; *************** *** 145,157 **** my $remaining = $ENV{"CONTENT_LENGTH"}; my $inheader = 1; my $itemname = ""; ! # open(DEBUG, ">debug") || die "Can't open debugging thing"; ! # print DEBUG "Boundary is '$boundary'\n"; while ($remaining > 0 && ($_ = )) { $remaining -= length($_); ! # print DEBUG "< $_"; if ($_ =~ m/^-*$boundary/) { ! # print DEBUG "Entered header\n"; $inheader = 1; $itemname = ""; next; --- 145,157 ---- my $remaining = $ENV{"CONTENT_LENGTH"}; my $inheader = 1; my $itemname = ""; ! # open(DEISSUE, ">deissue") || die "Can't open deissueging thing"; ! # print DEISSUE "Boundary is '$boundary'\n"; while ($remaining > 0 && ($_ = )) { $remaining -= length($_); ! # print DEISSUE "< $_"; if ($_ =~ m/^-*$boundary/) { ! # print DEISSUE "Entered header\n"; $inheader = 1; $itemname = ""; next; *************** *** 160,171 **** if ($inheader) { if (m/^\s*$/) { $inheader = 0; ! # print DEBUG "left header\n"; $::FORM{$itemname} = ""; } if (m/^Content-Disposition:\s*form-data\s*;\s*name\s*=\s*"([^\"]+)"/i) { $itemname = $1; ! # print DEBUG "Found itemname $itemname\n"; if (m/;\s*filename\s*=\s*"([^\"]+)"/i) { $::FILENAME{$itemname} = $1; } --- 160,171 ---- if ($inheader) { if (m/^\s*$/) { $inheader = 0; ! # print DEISSUE "left header\n"; $::FORM{$itemname} = ""; } if (m/^Content-Disposition:\s*form-data\s*;\s*name\s*=\s*"([^\"]+)"/i) { $itemname = $1; ! # print DEISSUE "Found itemname $itemname\n"; if (m/;\s*filename\s*=\s*"([^\"]+)"/i) { $::FILENAME{$itemname} = $1; } *************** *** 185,191 **** # check and see if a given field exists, is non-empty, and is set to a ! # legal value. assume a browser bug and abort appropriately if not. # if $legalsRef is not passed, just check to make sure the value exists and # is non-NULL # --- 185,191 ---- # check and see if a given field exists, is non-empty, and is set to a ! # legal value. assume a browser issue and abort appropriately if not. # if $legalsRef is not passed, just check to make sure the value exists and # is non-NULL # *************** *** 201,207 **** lsearch($legalsRef, $formRef->{$fieldname})<0) ){ print "A legal $fieldname was not set; "; ! print Param("browserbugmessage"); PutFooter(); exit 0; } --- 201,207 ---- lsearch($legalsRef, $formRef->{$fieldname})<0) ){ print "A legal $fieldname was not set; "; ! print Param("browserissuemessage"); PutFooter(); exit 0; } *************** *** 216,222 **** if ( !defined $formRef->{$fieldname} ) { print "$fieldname was not defined; "; ! print Param("browserbugmessage"); PutFooter(); exit 0; } --- 216,222 ---- if ( !defined $formRef->{$fieldname} ) { print "$fieldname was not defined; "; ! print Param("browserissuemessage"); PutFooter(); exit 0; } *************** *** 230,236 **** if ( $number !~ /^[1-9][0-9]*$/ ) { print "Received string \"$number\" when postive integer expected; "; ! print Param("browserbugmessage"); PutFooter(); exit 0; } --- 230,236 ---- if ( $number !~ /^[1-9][0-9]*$/ ) { print "Received string \"$number\" when postive integer expected; "; ! print Param("browserissuemessage"); PutFooter(); exit 0; } *************** *** 255,291 **** $var =~ s//\>/g; $var =~ s/"/\"/g; ! # See bug http://bugzilla.mozilla.org/show_bug.cgi?id=4928 for ! # explanaion of why bugzilla does this linebreak substitution. ! # This caused form submission problems in mozilla (bug 22983, 32000). $var =~ s/\n/\ /g; $var =~ s/\r/\ /g; return $var; } sub navigation_header { ! if (defined $::COOKIE{"BUGLIST"} && $::COOKIE{"BUGLIST"} ne "" && defined $::FORM{'id'}) { ! my @bugs = split(/:/, $::COOKIE{"BUGLIST"}); ! my $cur = lsearch(\@bugs, $::FORM{"id"}); ! print "Bug List: (@{[$cur + 1]} of @{[$#bugs + 1]})\n"; ! print "First\n"; ! print "Last\n"; if ($cur > 0) { ! print "Prev\n"; } else { print "Prev\n"; } ! if ($cur < $#bugs) { ! $::next_bug = $bugs[$cur + 1]; ! print "Next\n"; } else { print "Next\n"; } print qq{  Show list\n}; } print "     Query page\n"; ! print "     Enter new bug\n" } sub make_checkboxes { --- 255,291 ---- $var =~ s//\>/g; $var =~ s/"/\"/g; ! # See issue http://issuezilla.mozilla.org/show_bug.cgi?id=4928 for ! # explanaion of why issuezilla does this linebreak substitution. ! # This caused form submission problems in mozilla (issue 22983, 32000). $var =~ s/\n/\ /g; $var =~ s/\r/\ /g; return $var; } sub navigation_header { ! if (defined $::COOKIE{"ISSUELIST"} && $::COOKIE{"ISSUELIST"} ne "" && defined $::FORM{'id'}) { ! my @issues = split(/:/, $::COOKIE{"ISSUELIST"}); ! my $cur = lsearch(\@issues, $::FORM{"id"}); ! print "Issue List: (@{[$cur + 1]} of @{[$#issues + 1]})\n"; ! print "First\n"; ! print "Last\n"; if ($cur > 0) { ! print "Prev\n"; } else { print "Prev\n"; } ! if ($cur < $#issues) { ! $::next_issue = $issues[$cur + 1]; ! print "Next\n"; } else { print "Next\n"; } print qq{  Show list\n}; } print "     Query page\n"; ! print "     Enter new issue\n" } sub make_checkboxes { *************** *** 454,460 **** if ( Param("strictvaluechecks") && $::CheckOptionValues && ($default ne $::dontchange) && ($default ne "-All-") && ($default ne "DUPLICATE") ) { ! print "Possible bug database corruption has been detected. " . "Please send mail to " . Param("maintainer") . " with " . "details of what you were doing when this message " . "appeared. Thank you.\n"; --- 454,460 ---- if ( Param("strictvaluechecks") && $::CheckOptionValues && ($default ne $::dontchange) && ($default ne "-All-") && ($default ne "DUPLICATE") ) { ! print "Possible issue database corruption has been detected. " . "Please send mail to " . Param("maintainer") . " with " . "details of what you were doing when this message " . "appeared. Thank you.\n"; *************** *** 533,540 **** my $loginok = 0; $::disabledreason = ''; $::userid = 0; ! if (defined $::COOKIE{"Bugzilla_login"} && ! defined $::COOKIE{"Bugzilla_logincookie"}) { ConnectToDatabase(); if (!defined $ENV{'REMOTE_HOST'}) { $ENV{'REMOTE_HOST'} = $ENV{'REMOTE_ADDR'}; --- 533,540 ---- my $loginok = 0; $::disabledreason = ''; $::userid = 0; ! if (defined $::COOKIE{"Issuezilla_login"} && ! defined $::COOKIE{"Issuezilla_logincookie"}) { ConnectToDatabase(); if (!defined $ENV{'REMOTE_HOST'}) { $ENV{'REMOTE_HOST'} = $ENV{'REMOTE_ADDR'}; *************** *** 542,554 **** SendSQL("SELECT profiles.userid, profiles.groupset, " . "profiles.login_name, " . "profiles.login_name = " . ! SqlQuote($::COOKIE{"Bugzilla_login"}) . " AND profiles.cryptpassword = logincookies.cryptpassword " . "AND logincookies.hostname = " . SqlQuote($ENV{"REMOTE_HOST"}) . ", profiles.disabledtext " . " FROM profiles, logincookies WHERE logincookies.cookie = " . ! SqlQuote($::COOKIE{"Bugzilla_logincookie"}) . " AND profiles.userid = logincookies.userid"); my @row; if (@row = FetchSQLData()) { --- 542,554 ---- SendSQL("SELECT profiles.userid, profiles.groupset, " . "profiles.login_name, " . "profiles.login_name = " . ! SqlQuote($::COOKIE{"Issuezilla_login"}) . " AND profiles.cryptpassword = logincookies.cryptpassword " . "AND logincookies.hostname = " . SqlQuote($ENV{"REMOTE_HOST"}) . ", profiles.disabledtext " . " FROM profiles, logincookies WHERE logincookies.cookie = " . ! SqlQuote($::COOKIE{"Issuezilla_logincookie"}) . " AND profiles.userid = logincookies.userid"); my @row; if (@row = FetchSQLData()) { *************** *** 558,564 **** $loginok = 1; $::userid = $userid; $::usergroupset = $groupset; ! $::COOKIE{"Bugzilla_login"} = $loginname; # Makes sure case # is in # canonical form. } else { --- 558,564 ---- $loginok = 1; $::userid = $userid; $::usergroupset = $groupset; ! $::COOKIE{"Issuezilla_login"} = $loginname; # Makes sure case # is in # canonical form. } else { *************** *** 573,579 **** delete $::FORM{'who'} unless $whoid; } if (!$loginok) { ! delete $::COOKIE{"Bugzilla_login"}; } return $loginok; } --- 573,579 ---- delete $::FORM{'who'} unless $whoid; } if (!$loginok) { ! delete $::COOKIE{"Issuezilla_login"}; } return $loginok; } *************** *** 609,615 **** "login" => $login, "password" => $password}); ! open SENDMAIL, "|/usr/lib/sendmail -t"; print SENDMAIL $msg; close SENDMAIL; --- 609,615 ---- "login" => $login, "password" => $password}); ! open SENDMAIL, "|/var/qmail/bin/qmail-inject -froot"; print SENDMAIL $msg; close SENDMAIL; *************** *** 623,629 **** sub confirm_login { my ($nexturl) = (@_); ! # Uncommenting the next line can help debugging... # print "Content-type: text/plain\n\n"; ConnectToDatabase(); --- 623,629 ---- sub confirm_login { my ($nexturl) = (@_); ! # Uncommenting the next line can help deissueging... # print "Content-type: text/plain\n\n"; ConnectToDatabase(); *************** *** 632,645 **** # to a later section. -Joe Robins, 8/3/00 my $enteredlogin = ""; my $realcryptpwd = ""; ! if (defined $::FORM{"Bugzilla_login"} && ! defined $::FORM{"Bugzilla_password"}) { ! $enteredlogin = $::FORM{"Bugzilla_login"}; ! my $enteredpwd = $::FORM{"Bugzilla_password"}; CheckEmailSyntax($enteredlogin); ! $realcryptpwd = PasswordForLogin($::FORM{"Bugzilla_login"}); if (defined $::FORM{"PleaseMailAPassword"}) { my $realpwd; --- 632,645 ---- # to a later section. -Joe Robins, 8/3/00 my $enteredlogin = ""; my $realcryptpwd = ""; ! if (defined $::FORM{"Issuezilla_login"} && ! defined $::FORM{"Issuezilla_password"}) { ! $enteredlogin = $::FORM{"Issuezilla_login"}; ! my $enteredpwd = $::FORM{"Issuezilla_password"}; CheckEmailSyntax($enteredlogin); ! $realcryptpwd = PasswordForLogin($::FORM{"Issuezilla_login"}); if (defined $::FORM{"PleaseMailAPassword"}) { my $realpwd; *************** *** 769,775 **** $realcryptpwd = PasswordForLogin($enteredlogin); # If we don't get a result, then we've got a user who isn't in ! # Bugzilla's database yet, so we've got to add them. if($realcryptpwd eq "") { # We'll want the user's name for this. my $userRealName = ($userEntry->getValues("displayName"))[0]; --- 769,775 ---- $realcryptpwd = PasswordForLogin($enteredlogin); # If we don't get a result, then we've got a user who isn't in ! # Issuezilla's database yet, so we've got to add them. if($realcryptpwd eq "") { # We'll want the user's name for this. my $userRealName = ($userEntry->getValues("displayName"))[0]; *************** *** 784,790 **** # And now, if we've logged in via either method, then we need to set # the cookies. if($enteredlogin ne "") { ! $::COOKIE{"Bugzilla_login"} = $enteredlogin; if (!defined $ENV{'REMOTE_HOST'}) { $ENV{'REMOTE_HOST'} = $ENV{'REMOTE_ADDR'}; } --- 784,790 ---- # And now, if we've logged in via either method, then we need to set # the cookies. if($enteredlogin ne "") { ! $::COOKIE{"Issuezilla_login"} = $enteredlogin; if (!defined $ENV{'REMOTE_HOST'}) { $ENV{'REMOTE_HOST'} = $ENV{'REMOTE_ADDR'}; } *************** *** 792,805 **** SendSQL("select LAST_INSERT_ID()"); my $logincookie = FetchOneColumn(); ! $::COOKIE{"Bugzilla_logincookie"} = $logincookie; ! print "Set-Cookie: Bugzilla_login=$enteredlogin ; path=/; expires=Sun, 30-Jun-2029 00:00:00 GMT\n"; ! print "Set-Cookie: Bugzilla_logincookie=$logincookie ; path=/; expires=Sun, 30-Jun-2029 00:00:00 GMT\n"; ! # This next one just cleans out any old bugzilla passwords that may # be sitting around in the cookie files, from the bad old days when # we actually stored the password there. ! print "Set-Cookie: Bugzilla_password= ; path=/; expires=Sun, 30-Jun-80 00:00:00 GMT\n"; } --- 792,805 ---- SendSQL("select LAST_INSERT_ID()"); my $logincookie = FetchOneColumn(); ! $::COOKIE{"Issuezilla_logincookie"} = $logincookie; ! print "Set-Cookie: Issuezilla_login=$enteredlogin ; path=/; expires=Sun, 30-Jun-2029 00:00:00 GMT\n"; ! print "Set-Cookie: Issuezilla_logincookie=$logincookie ; path=/; expires=Sun, 30-Jun-2029 00:00:00 GMT\n"; ! # This next one just cleans out any old issuezilla passwords that may # be sitting around in the cookie files, from the bad old days when # we actually stored the password there. ! print "Set-Cookie: Issuezilla_password= ; path=/; expires=Sun, 30-Jun-80 00:00:00 GMT\n"; } *************** *** 807,815 **** if ($loginok != 1) { if ($::disabledreason) { ! print "Set-Cookie: Bugzilla_login= ; path=/; expires=Sun, 30-Jun-80 00:00:00 GMT ! Set-Cookie: Bugzilla_logincookie= ; 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 "; --- 807,815 ---- if ($loginok != 1) { if ($::disabledreason) { ! print "Set-Cookie: Issuezilla_login= ; path=/; expires=Sun, 30-Jun-80 00:00:00 GMT ! Set-Cookie: Issuezilla_logincookie= ; path=/; expires=Sun, 30-Jun-80 00:00:00 GMT ! Set-Cookie: Issuezilla_password= ; path=/; expires=Sun, 30-Jun-80 00:00:00 GMT Content-type: text/html "; *************** *** 854,871 **** } else { print " E-mail address: ! Password: ! "; } print " "; foreach my $i (keys %::FORM) { ! if ($i =~ /^Bugzilla_/) { next; } print "\n"; --- 854,871 ---- } else { print " E-mail address: ! Password: ! "; } print " "; foreach my $i (keys %::FORM) { ! if ($i =~ /^Issuezilla_/) { next; } print "\n"; *************** *** 899,905 **** # Update the timestamp on our logincookie, so it'll keep on working. if ($::dbwritesallowed) { SendSQL("UPDATE logincookies SET lastused = null " . ! "WHERE cookie = $::COOKIE{'Bugzilla_logincookie'}"); } return $::userid; } --- 899,905 ---- # Update the timestamp on our logincookie, so it'll keep on working. if ($::dbwritesallowed) { SendSQL("UPDATE logincookies SET lastused = null " . ! "WHERE cookie = $::COOKIE{'Issuezilla_logincookie'}"); } return $::userid; } *************** *** 966,1020 **** sub CheckIfVotedConfirmed { my ($id, $who) = (@_); ! SendSQL("SELECT bugs.votes, bugs.bug_status, products.votestoconfirm, " . ! " bugs.everconfirmed " . ! "FROM bugs, products " . ! "WHERE bugs.bug_id = $id AND products.product = bugs.product"); my ($votes, $status, $votestoconfirm, $everconfirmed) = (FetchSQLData()); if ($votes >= $votestoconfirm && $status eq $::unconfirmedstate) { ! SendSQL("UPDATE bugs SET bug_status = 'NEW', everconfirmed = 1 " . ! "WHERE bug_id = $id"); ! my $fieldid = GetFieldID("bug_status"); ! SendSQL("INSERT INTO bugs_activity " . ! "(bug_id,who,bug_when,fieldid,oldvalue,newvalue) VALUES " . "($id,$who,now(),$fieldid,'$::unconfirmedstate','NEW')"); if (!$everconfirmed) { $fieldid = GetFieldID("everconfirmed"); ! SendSQL("INSERT INTO bugs_activity " . ! "(bug_id,who,bug_when,fieldid,oldvalue,newvalue) VALUES " . "($id,$who,now(),$fieldid,'0','1')"); } AppendComment($id, DBID_to_name($who), ! "*** This bug has been confirmed by popular vote. ***"); ! print "

Bug $id has been confirmed by votes.

\n"; system("./processmail", $id); ! print "
Go To BUG# $id
\n"; } } ! sub DumpBugActivity { my ($id, $starttime) = (@_); my $datepart = ""; die "Invalid id: $id" unless $id=~/^\s*\d+\s*$/; if (defined $starttime) { ! $datepart = "and bugs_activity.bug_when >= $starttime"; } my $query = " ! SELECT IFNULL(fielddefs.name, bugs_activity.fieldid), ! bugs_activity.bug_when, ! bugs_activity.oldvalue, bugs_activity.newvalue, profiles.login_name ! FROM bugs_activity LEFT JOIN fielddefs ON ! bugs_activity.fieldid = fielddefs.fieldid, profiles ! WHERE bugs_activity.bug_id = $id $datepart ! AND profiles.userid = bugs_activity.who ! ORDER BY bugs_activity.bug_when"; SendSQL($query); --- 966,1020 ---- sub CheckIfVotedConfirmed { my ($id, $who) = (@_); ! SendSQL("SELECT issues.votes, issues.issue_status, products.votestoconfirm, " . ! " issues.everconfirmed " . ! "FROM issues, products " . ! "WHERE issues.issue_id = $id AND products.product = issues.product"); my ($votes, $status, $votestoconfirm, $everconfirmed) = (FetchSQLData()); if ($votes >= $votestoconfirm && $status eq $::unconfirmedstate) { ! SendSQL("UPDATE issues SET issue_status = 'NEW', everconfirmed = 1 " . ! "WHERE issue_id = $id"); ! my $fieldid = GetFieldID("issue_status"); ! SendSQL("INSERT INTO issues_activity " . ! "(issue_id,who,issue_when,fieldid,oldvalue,newvalue) VALUES " . "($id,$who,now(),$fieldid,'$::unconfirmedstate','NEW')"); if (!$everconfirmed) { $fieldid = GetFieldID("everconfirmed"); ! SendSQL("INSERT INTO issues_activity " . ! "(issue_id,who,issue_when,fieldid,oldvalue,newvalue) VALUES " . "($id,$who,now(),$fieldid,'0','1')"); } AppendComment($id, DBID_to_name($who), ! "*** This issue has been confirmed by popular vote. ***"); ! print "

Issue $id has been confirmed by votes.

\n"; system("./processmail", $id); ! print "
Go To ISSUE# $id
\n"; } } ! sub DumpIssueActivity { my ($id, $starttime) = (@_); my $datepart = ""; die "Invalid id: $id" unless $id=~/^\s*\d+\s*$/; if (defined $starttime) { ! $datepart = "and issues_activity.issue_when >= $starttime"; } my $query = " ! SELECT IFNULL(fielddefs.name, issues_activity.fieldid), ! issues_activity.issue_when, ! issues_activity.oldvalue, issues_activity.newvalue, profiles.login_name ! FROM issues_activity LEFT JOIN fielddefs ON ! issues_activity.fieldid = fielddefs.fieldid, profiles ! WHERE issues_activity.issue_id = $id $datepart ! AND profiles.userid = issues_activity.who ! ORDER BY issues_activity.issue_when"; SendSQL($query); *************** *** 1055,1079 **** } $html .= ! qq{ | bug \# }; $html .= " | Reports"; if ($loggedin) { ! my $mybugstemplate = Param("mybugstemplate"); my %substs; ! $substs{'userid'} = url_quote($::COOKIE{"Bugzilla_login"}); if (!defined $::anyvotesallowed) { GetVersionTable(); } if ($::anyvotesallowed) { $html .= qq{ | My votes}; } ! SendSQL("SELECT mybugslink, userid, blessgroupset FROM profiles " . ! "WHERE login_name = " . SqlQuote($::COOKIE{'Bugzilla_login'})); ! my ($mybugslink, $userid, $blessgroupset) = (FetchSQLData()); ! if ($mybugslink) { ! my $mybugsurl = PerformSubsts($mybugstemplate, \%substs); ! $html = $html . " | My bugs"; } SendSQL("SELECT name FROM namedqueries " . "WHERE userid = $userid AND linkinfooter"); --- 1055,1079 ---- } $html .= ! qq{ | issue \# }; $html .= " | Reports"; if ($loggedin) { ! my $myissuestemplate = Param("myissuestemplate"); my %substs; ! $substs{'userid'} = url_quote($::COOKIE{"Issuezilla_login"}); if (!defined $::anyvotesallowed) { GetVersionTable(); } if ($::anyvotesallowed) { $html .= qq{ | My votes}; } ! SendSQL("SELECT myissueslink, userid, blessgroupset FROM profiles " . ! "WHERE login_name = " . SqlQuote($::COOKIE{'Issuezilla_login'})); ! my ($myissueslink, $userid, $blessgroupset) = (FetchSQLData()); ! if ($myissueslink) { ! my $myissuesurl = PerformSubsts($myissuestemplate, \%substs); ! $html = $html . " | My issues"; } SendSQL("SELECT name FROM namedqueries " . "WHERE userid = $userid AND linkinfooter"); *************** *** 1099,1105 **** if (UserInGroup("editkeywords")) { $html .= ", keywords"; } ! $html .= " | Log out $::COOKIE{'Bugzilla_login'}"; } else { $html .= " | New account\n"; --- 1099,1105 ---- if (UserInGroup("editkeywords")) { $html .= ", keywords"; } ! $html .= " | Log out $::COOKIE{'Issuezilla_login'}"; } else { $html .= " | New account\n"; *************** *** 1115,1121 **** $| = 1; ! # Uncommenting this next line can help debugging. # print "Content-type: text/html\n\nHello mom\n"; # foreach my $k (sort(keys %ENV)) { --- 1115,1121 ---- $| = 1; ! # Uncommenting this next line can help deissueging. # print "Content-type: text/html\n\nHello mom\n"; # foreach my $k (sort(keys %ENV)) { Index: CHANGES =================================================================== RCS file: /cvsroot/mozilla/webtools/bugzilla/CHANGES,v retrieving revision 1.38 diff -c -r1.38 CHANGES *** CHANGES 1999/10/12 16:57:57 1.38 --- CHANGES 2000/09/29 04:57:12 *************** *** 70,76 **** You should also run this script to populate the new field: ! #!/usr/bonsaitools/bin/perl -w use diagnostics; use strict; require "globals.pl"; --- 70,76 ---- You should also run this script to populate the new field: ! #!/usr/bin/perl -w use diagnostics; use strict; require "globals.pl"; *************** *** 146,152 **** like that will happen. But to fix problems that have already crept into your database, you can run the following perl script (which is slow and ugly, but does work:) ! #!/usr/bonsaitools/bin/perl -w use diagnostics; use strict; require "globals.pl"; --- 146,152 ---- like that will happen. But to fix problems that have already crept into your database, you can run the following perl script (which is slow and ugly, but does work:) ! #!/usr/bin/perl -w use diagnostics; use strict; require "globals.pl"; Index: README =================================================================== RCS file: /cvsroot/mozilla/webtools/bugzilla/README,v retrieving revision 1.39 diff -c -r1.39 README *** README 2000/09/06 05:37:57 1.39 --- README 2000/09/29 04:57:12 *************** *** 330,336 **** 1. server's host: just use "localhost" 2. database name: "bugs" if you're following these directions 3. MySQL username: whatever you created for your webserver user ! probably "nobody" 4. Password for the MySQL account in item 3. Just fill in those values and close up globals.pl --- 330,336 ---- 1. server's host: just use "localhost" 2. database name: "bugs" if you're following these directions 3. MySQL username: whatever you created for your webserver user ! probably "tigris" 4. Password for the MySQL account in item 3. Just fill in those values and close up globals.pl Index: RelationSet.pm =================================================================== RCS file: /cvsroot/mozilla/webtools/bugzilla/RelationSet.pm,v retrieving revision 1.3 diff -c -r1.3 RelationSet.pm *** RelationSet.pm 2000/06/21 19:03:45 1.3 --- RelationSet.pm 2000/09/29 04:57:12 *************** *** 9,15 **** # 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 --- 9,15 ---- # implied. See the License for the specific language governing # rights and limitations under the License. # ! # The Original Code is the Issuezilla Issue Tracking System. # # The Initial Developer of the Original Code is Netscape Communications # Corporation. Portions created by Netscape are *************** *** 21,31 **** # Dave Miller # 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. --- 21,31 ---- # Dave Miller # 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 issue ! # and the users CCed on that issue. Currently, the relation objects are ! # expected to be issuezilla userids. However, this could and perhaps # should be generalized to work with non userid objects, such as ! # keywords associated with an issue. 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. *************** *** 79,85 **** 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) ) = @_; --- 79,85 ---- 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 "issue_id") $invariantValue, # what to hold the above column constant at $columnName # the column which varies (often a userid) ) = @_; Index: backdoor.cgi =================================================================== RCS file: /cvsroot/mozilla/webtools/bugzilla/backdoor.cgi,v retrieving revision 1.14 diff -c -r1.14 backdoor.cgi *** backdoor.cgi 2000/05/17 21:29:31 1.14 --- backdoor.cgi 2000/09/29 04:57:12 *************** *** 1,4 **** ! #!/usr/bonsaitools/bin/perl -w # -*- Mode: perl; indent-tabs-mode: nil -*- # # The contents of this file are subject to the Mozilla Public --- 1,4 ---- ! #!/usr/bin/perl -w # -*- Mode: perl; indent-tabs-mode: nil -*- # # The contents of this file are subject to the Mozilla Public *************** *** 11,17 **** # 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 --- 11,17 ---- # implied. See the License for the specific language governing # rights and limitations under the License. # ! # The Original Code is the Issuezilla Issue Tracking System. # # The Initial Developer of the Original Code is Netscape Communications # Corporation. Portions created by Netscape are *************** *** 21,27 **** # Contributor(s): Terry Weissman # Provides a silly 'back-door' mechanism to let me automatically insert ! # bugs from the netscape bugsystem. Other installations of Bugzilla probably # don't need to worry about this file any. use diagnostics; --- 21,27 ---- # Contributor(s): Terry Weissman # Provides a silly 'back-door' mechanism to let me automatically insert ! # issues from the netscape issuesystem. Other installations of Issuezilla probably # don't need to worry about this file any. use diagnostics; *************** *** 79,92 **** sub Punt { my ($label, $value) = (@_); my $maintainer = Param("maintainer"); ! print "I don't know how to move into Bugzilla a bug with a $label of $value. If you really do need to do this, speak to $maintainer and maybe he can teach me."; exit; } ! # Do remapping of things from BugSplat world to Bugzilla. if ($prod eq "Communicator") { $prod = "Browser"; --- 79,92 ---- sub Punt { my ($label, $value) = (@_); my $maintainer = Param("maintainer"); ! print "I don't know how to move into Issuezilla an issue with a $label of $value. If you really do need to do this, speak to $maintainer and maybe he can teach me."; exit; } ! # Do remapping of things from IssueSplat world to Issuezilla. if ($prod eq "Communicator") { $prod = "Browser"; *************** *** 121,130 **** 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'} ! Imported into Bugzilla on " . time2str("%D %H:%M", time()) . ") " . $::FORM{'long_desc'}; --- 121,130 ---- my $longdesc = ! "(This issue imported from IssueSplat, Netscape's internal issuesystem. It ! was known there as issue #$::FORM{'issue_id'} ! http://scopus.netscape.com/issuesplat/show_bug.cgi?id=$::FORM{'issue_id'} ! Imported into Issuezilla on " . time2str("%D %H:%M", time()) . ") " . $::FORM{'long_desc'}; *************** *** 142,157 **** my @list = ('reporter', 'assigned_to', 'product', 'version', 'rep_platform', ! 'op_sys', 'bug_status', 'bug_severity', 'priority', 'component', 'short_desc', 'creation_ts', 'delta_ts', ! 'bug_file_loc', 'qa_contact', 'groupset'); my @vallist; foreach my $i (@list) { push @vallist, SqlQuote($::FORM{$i}); } ! my $query = "insert into bugs (" . join(',', @list) . ") values (" . join(',', @vallist) . --- 142,157 ---- my @list = ('reporter', 'assigned_to', 'product', 'version', 'rep_platform', ! 'op_sys', 'issue_status', 'issue_type', 'priority', 'component', 'short_desc', 'creation_ts', 'delta_ts', ! 'issue_file_loc', 'qa_contact', 'groupset'); my @vallist; foreach my $i (@list) { push @vallist, SqlQuote($::FORM{$i}); } ! my $query = "insert into issues (" . join(',', @list) . ") values (" . join(',', @vallist) . *************** *** 163,178 **** 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); ! SendSQL("insert into cc (bug_id, who) values ($zillaid, $cid)"); } } ! print "Created bugzilla bug $zillaid\n"; system("./processmail", $zillaid); --- 163,178 ---- SendSQL("select LAST_INSERT_ID()"); my $zillaid = FetchOneColumn(); ! SendSQL("INSERT INTO longdescs (issue_id, who, issue_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); ! SendSQL("insert into cc (issue_id, who) values ($zillaid, $cid)"); } } ! print "Created issuezilla issue $zillaid\n"; system("./processmail", $zillaid); Index: booleanchart.html =================================================================== RCS file: /cvsroot/mozilla/webtools/bugzilla/booleanchart.html,v retrieving revision 1.3 diff -c -r1.3 booleanchart.html *** booleanchart.html 2000/08/16 23:07:37 1.3 --- booleanchart.html 2000/09/29 04:57:12 *************** *** 10,16 ****

! 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). --- 10,16 ----

! The Issuezilla 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). *************** *** 48,54 **** 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, --- 48,54 ---- 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 issue. 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, *************** *** 58,66 ****

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. --- 58,66 ----

For example: if you search for "priority changed to P5" and ! "priority changed by person@addr", it will only find issues where the given person at some time changed the priority to P5. However, if ! what you really want is to find all issues 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. *************** *** 74,79 ****


! Last modified: Wed Aug 16 16:06:36 2000 --- 74,79 ----
! Last modified: Sat Sep 23 10:52:57 PDT 2000 Index: bug_form.pl =================================================================== RCS file: /cvsroot/mozilla/webtools/bugzilla/bug_form.pl,v retrieving revision 1.56 diff -c -r1.56 bug_form.pl *** bug_form.pl 2000/09/05 17:48:22 1.56 --- bug_form.pl 2000/09/29 04:57:12 *************** *** 10,16 **** # 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 --- 10,16 ---- # implied. See the License for the specific language governing # rights and limitations under the License. # ! # The Original Code is the Issuezilla issue Tracking System. # # The Initial Developer of the Original Code is Netscape Communications # Corporation. Portions created by Netscape are *************** *** 40,46 **** $zz = @::legal_product; $zz = @::legal_priority; $zz = @::settable_resolution; ! $zz = @::legal_severity; $zz = %::target_milestone; } --- 40,46 ---- $zz = @::legal_product; $zz = @::legal_priority; $zz = @::settable_resolution; ! $zz = @::legal_issue_type; $zz = %::target_milestone; } *************** *** 50,68 **** my $query = " select ! bugs.bug_id, product, version, rep_platform, op_sys, ! bug_status, resolution, priority, ! bug_severity, component, assigned_to, reporter, ! bug_file_loc, short_desc, target_milestone, qa_contact, --- 50,68 ---- my $query = " select ! issues.issue_id, product, version, rep_platform, op_sys, ! issue_status, resolution, priority, ! issue_type, component, assigned_to, reporter, ! issue_file_loc, short_desc, target_milestone, qa_contact, *************** *** 71,136 **** groupset, delta_ts, sum(votes.count) ! from bugs left join votes using(bug_id) ! where bugs.bug_id = $id ! and bugs.groupset & $::usergroupset = bugs.groupset ! group by bugs.bug_id"; SendSQL($query); ! my %bug; my @row; if (@row = FetchSQLData()) { my $count = 0; ! foreach my $field ("bug_id", "product", "version", "rep_platform", ! "op_sys", "bug_status", "resolution", "priority", ! "bug_severity", "component", "assigned_to", "reporter", ! "bug_file_loc", "short_desc", "target_milestone", "qa_contact", "status_whiteboard", "creation_ts", "groupset", "delta_ts", "votes") { ! $bug{$field} = shift @row; ! if (!defined $bug{$field}) { ! $bug{$field} = ""; } $count++; } } else { ! SendSQL("select groupset from bugs where bug_id = $id"); if (@row = FetchSQLData()) { print "

Permission denied.

\n"; if ($loginok) { print "Sorry; you do not have the permissions necessary to see\n"; ! print "bug $id.\n"; } else { ! print "Sorry; bug $id can only be viewed when logged\n"; print "into an account with the appropriate permissions. To\n"; ! print "see this bug, you must first\n"; print ""; print "log in."; } } else { ! print "

Bug not found

\n"; ! print "There does not seem to be a bug numbered $id.\n"; } PutFooter(); exit; } ! my $assignedtoid = $bug{'assigned_to'}; ! my $reporterid = $bug{'reporter'}; ! my $qacontactid = $bug{'qa_contact'}; ! $bug{'assigned_to'} = DBID_to_real_or_loginname($bug{'assigned_to'}); ! $bug{'reporter'} = DBID_to_real_or_loginname($bug{'reporter'}); print qq{
\n}; ! # foreach my $i (sort(keys(%bug))) { ! # my $q = value_quote($bug{$i}); # print qq{\n}; # } ! $bug{'long_desc'} = GetLongDescriptionAsHTML($id); ! my $longdesclength = length($bug{'long_desc'}); GetVersionTable(); --- 71,136 ---- groupset, delta_ts, sum(votes.count) ! from issues left join votes using(issue_id) ! where issues.issue_id = $id ! and issues.groupset & $::usergroupset = issues.groupset ! group by issues.issue_id"; SendSQL($query); ! my %issue; my @row; if (@row = FetchSQLData()) { my $count = 0; ! foreach my $field ("issue_id", "product", "version", "rep_platform", ! "op_sys", "issue_status", "resolution", "priority", ! "issue_type", "component", "assigned_to", "reporter", ! "issue_file_loc", "short_desc", "target_milestone", "qa_contact", "status_whiteboard", "creation_ts", "groupset", "delta_ts", "votes") { ! $issue{$field} = shift @row; ! if (!defined $issue{$field}) { ! $issue{$field} = ""; } $count++; } } else { ! SendSQL("select groupset from issues where issue_id = $id"); if (@row = FetchSQLData()) { print "

Permission denied.

\n"; if ($loginok) { print "Sorry; you do not have the permissions necessary to see\n"; ! print "issue $id.\n"; } else { ! print "Sorry; issue $id can only be viewed when logged\n"; print "into an account with the appropriate permissions. To\n"; ! print "see this issue, you must first\n"; print ""; print "log in."; } } else { ! print "

Issue not found

\n"; ! print "There does not seem to be an issue numbered $id.\n"; } PutFooter(); exit; } ! my $assignedtoid = $issue{'assigned_to'}; ! my $reporterid = $issue{'reporter'}; ! my $qacontactid = $issue{'qa_contact'}; ! $issue{'assigned_to'} = DBID_to_real_or_loginname($issue{'assigned_to'}); ! $issue{'reporter'} = DBID_to_real_or_loginname($issue{'reporter'}); print qq{\n}; ! # foreach my $i (sort(keys(%issue))) { ! # my $q = value_quote($issue{$i}); # print qq{\n}; # } ! $issue{'long_desc'} = GetLongDescriptionAsHTML($id); ! my $longdesclength = length($issue{'long_desc'}); GetVersionTable(); *************** *** 140,155 **** # These should be read from the database ... # ! my $platform_popup = make_options(\@::legal_platform, $bug{'rep_platform'}); ! my $priority_popup = make_options(\@::legal_priority, $bug{'priority'}); ! my $sev_popup = make_options(\@::legal_severity, $bug{'bug_severity'}); ! my $component_popup = make_options($::components{$bug{'product'}}, ! $bug{'component'}); my $ccSet = new RelationSet; ! $ccSet->mergeFromDB("select who from cc where bug_id=$id"); my @ccList = $ccSet->toArrayOfStrings(); my $cc_element = ""; if (scalar(@ccList) > 0) { --- 140,155 ---- # These should be read from the database ... # ! my $platform_popup = make_options(\@::legal_platform, $issue{'rep_platform'}); ! my $priority_popup = make_options(\@::legal_priority, $issue{'priority'}); ! my $issuetype_popup = make_options(\@::legal_issue_type, $issue{'issue_type'}); ! my $component_popup = make_options($::components{$issue{'product'}}, ! $issue{'component'}); my $ccSet = new RelationSet; ! $ccSet->mergeFromDB("select who from cc where issue_id=$id"); my @ccList = $ccSet->toArrayOfStrings(); my $cc_element = ""; if (scalar(@ccList) > 0) { *************** *** 161,167 **** "Remove selected CCs
\n"; } ! my $URL = $bug{'bug_file_loc'}; if (defined $URL && $URL ne "none" && $URL ne "NULL" && $URL ne "") { $URL = "URL:"; --- 161,167 ---- "Remove selected CCs
\n"; } ! my $URL = $issue{'issue_file_loc'}; if (defined $URL && $URL ne "none" && $URL ne "NULL" && $URL ne "") { $URL = "URL:"; *************** *** 170,246 **** } print " ! ! ! ! ! ! ! ! "; if (Param("usetargetmilestone")) { my $url = ""; ! if (defined $::milestoneurl{$bug{'product'}}) { ! $url = $::milestoneurl{$bug{'product'}}; } if ($url eq "") { $url = "notargetmilestone.html"; } ! if ($bug{'target_milestone'} eq "") { ! $bug{'target_milestone'} = " "; } print " "; } else { print ""; } --- 170,246 ---- } print " !
Bug#:$bug{'bug_id'}   Platform:  Reporter:$bug{'reporter'}
Product:   OS:   Add CC:
Component:   Version:   Cc: $cc_element
Status:$bug{'bug_status'}   Priority:  
Resolution:$bug{'resolution'}  Severity:  
Assigned To: $bug{'assigned_to'}  Target Milestone:   
! ! ! ! ! ! ! "; if (Param("usetargetmilestone")) { my $url = ""; ! if (defined $::milestoneurl{$issue{'product'}}) { ! $url = $::milestoneurl{$issue{'product'}}; } if ($url eq "") { $url = "notargetmilestone.html"; } ! if ($issue{'target_milestone'} eq "") { ! $issue{'target_milestone'} = " "; } print " "; } else { print ""; } *************** *** 249,255 **** "; if (Param("useqacontact")) { ! my $name = $bug{'qa_contact'} > 0 ? DBID_to_name($bug{'qa_contact'}) : ""; print " "; if (Param("useqacontact")) { ! my $name = $issue{'qa_contact'} > 0 ? DBID_to_name($issue{'qa_contact'}) : ""; print " "; --- 265,276 ---- "; *************** *** 280,286 **** "; } --- 280,286 ---- "; } *************** *** 288,294 **** if (@::legal_keywords) { SendSQL("SELECT keyworddefs.name FROM keyworddefs, keywords ! WHERE keywords.bug_id = $id AND keyworddefs.id = keywords.keywordid ORDER BY keyworddefs.name"); my @list; while (MoreSQLData()) { --- 288,294 ---- if (@::legal_keywords) { SendSQL("SELECT keyworddefs.name FROM keyworddefs, keywords ! WHERE keywords.issue_id = $id AND keyworddefs.id = keywords.keywordid ORDER BY keyworddefs.name"); my @list; while (MoreSQLData()) { *************** *** 304,310 **** } print "\n"; ! SendSQL("select attach_id, creation_ts, mimetype, description from attachments where bug_id = $id"); while (MoreSQLData()) { my ($attachid, $date, $mimetype, $desc) = (FetchSQLData()); if ($date =~ /^(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)$/) { --- 304,310 ---- } print "\n"; ! SendSQL("select attach_id, creation_ts, mimetype, description from attachments where issue_id = $id"); while (MoreSQLData()) { my ($attachid, $date, $mimetype, $desc) = (FetchSQLData()); if ($date =~ /^(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)$/) { *************** *** 321,330 **** my ($desc, $myfield, $targetfield) = (@_); print " ! !
Issue#:$issue{'issue_id'}   Platform:  Reporter:$issue{'reporter'}
Product:   OS:   Add CC:
Component:   Version:   Cc: $cc_element
Status:$issue{'issue_status'}   Priority:  
Resolution:$issue{'resolution'}  Issue type:  
Assigned To: $issue{'assigned_to'}  Target Milestone:   
QA Contact: --- 249,255 ----
QA Contact: *************** *** 265,276 ****
$URL !
Summary:
$URL !
Summary:
Status Whiteboard:
Status Whiteboard:
Attachments:
Attachments:$desc:"; my @list; ! SendSQL("select dependencies.$targetfield, bugs.bug_status ! from dependencies, bugs where dependencies.$myfield = $id ! and bugs.bug_id = dependencies.$targetfield order by dependencies.$targetfield"); while (MoreSQLData()) { my ($i, $stat) = (FetchSQLData()); --- 321,330 ---- my ($desc, $myfield, $targetfield) = (@_); print "$desc:"; my @list; ! SendSQL("select dependencies.$targetfield, issues.issue_status ! from dependencies, issues where dependencies.$myfield = $id ! and issues.issue_id = dependencies.$targetfield order by dependencies.$targetfield"); while (MoreSQLData()) { my ($i, $stat) = (FetchSQLData()); *************** *** 346,352 **** if (Param("usedependencies")) { print "\n"; ! EmitDependList("Bug $id depends on", "blocked", "dependson"); print qq{ "; ! EmitDependList("Issue $id blocks", "dependson", "blocked"); print "
Show dependency tree }; --- 346,352 ---- if (Param("usedependencies")) { print "\n"; ! EmitDependList("Issue $id depends on", "blocked", "dependson"); print qq{ "; ! EmitDependList("Bug $id blocks", "dependson", "blocked"); print "
Show dependency tree }; *************** *** 356,371 **** }; } print "
\n"; } ! if ($::prodmaxvotes{$bug{'product'}}) { print qq{ !
Votes for bug $id: ! $bug{'votes'} !    Vote for this bug
}; } --- 356,371 ---- }; } print "
\n"; } ! if ($::prodmaxvotes{$issue{'product'}}) { print qq{ !
Votes for issue $id: ! $issue{'votes'} !    Vote for this issue
}; } *************** *** 378,406 **** if ($::usergroupset ne '0') { ! SendSQL("select bit, description, (bit & $bug{'groupset'} != 0) from groups where bit & $::usergroupset != 0 and isbuggroup != 0 order by bit"); while (MoreSQLData()) { my ($bit, $description, $ison) = (FetchSQLData()); my $check0 = !$ison ? " SELECTED" : ""; my $check1 = $ison ? " SELECTED" : ""; print "
\n"; } } print "
! Leave as $bug{'bug_status'} $bug{'resolution'}
"; # knum is which knob number we're generating, in javascript terms. my $knum = 1; ! my $status = $bug{'bug_status'}; # In the below, if the person hasn't logged in ($::userid == 0), then # we treat them as if they can do anything. That's because we don't --- 378,406 ---- if ($::usergroupset ne '0') { ! SendSQL("select bit, description, (bit & $issue{'groupset'} != 0) from groups where bit & $::usergroupset != 0 and isissuegroup != 0 order by bit"); while (MoreSQLData()) { my ($bit, $description, $ison) = (FetchSQLData()); my $check0 = !$ison ? " SELECTED" : ""; my $check1 = $ison ? " SELECTED" : ""; print "
\n"; } } print "
! Leave as $issue{'issue_status'} $issue{'resolution'}
"; # knum is which knob number we're generating, in javascript terms. my $knum = 1; ! my $status = $issue{'issue_status'}; # In the below, if the person hasn't logged in ($::userid == 0), then # we treat them as if they can do anything. That's because we don't *************** *** 409,422 **** # in the world; their permissions will get checked when they log in # and actually try to make the change. ! my $canedit = UserInGroup("editbugs") || ($::userid == 0); my $canconfirm; if ($status eq $::unconfirmedstate) { $canconfirm = UserInGroup("canconfirm") || ($::userid == 0); if ($canedit || $canconfirm) { print ""; ! print "Confirm bug (change status to NEW)
"; $knum++; } } --- 409,422 ---- # in the world; their permissions will get checked when they log in # and actually try to make the change. ! my $canedit = UserInGroup("editissues") || ($::userid == 0); my $canconfirm; if ($status eq $::unconfirmedstate) { $canconfirm = UserInGroup("canconfirm") || ($::userid == 0); if ($canedit || $canconfirm) { print ""; ! print "Confirm issue (change status to NEW)
"; $knum++; } } *************** *** 432,507 **** print ""; my $extra = ""; if ($status eq $::unconfirmedstate && ($canconfirm || $canedit)) { ! $extra = "confirm bug, "; } ! print "Accept bug (${extra}change status to ASSIGNED)
"; $knum++; } ! if ($bug{'resolution'} ne "") { print "\n"; print "Clear the resolution (remove the current resolution of\n"; ! print "$bug{'resolution'})
\n"; $knum++; } my $resolution_popup = make_options(\@::settable_resolution, ! $bug{'resolution'}); print " ! Resolve bug, changing resolution to
\n"; $knum++; print " ! Resolve bug, mark it as duplicate of bug #
\n"; $knum++; ! if ( $bug{'assigned_to'} =~ /(.*)\((.*)\)/ ) { ! $bug{'assigned_to'} = $1; ! chop($bug{'assigned_to'}); } ! my $assign_element = ""; print " ! Reassign bug to $assign_element
\n"; if ($status eq $::unconfirmedstate && ($canconfirm || $canedit)) { ! print "     and confirm bug (change status to NEW)
"; } $knum++; print " ! Reassign bug to owner of selected component
\n"; if ($status eq $::unconfirmedstate && ($canconfirm || $canedit)) { ! print "     and confirm bug (change status to NEW)
"; } $knum++; ! } elsif ( Param("move-enabled") && ($bug{'resolution'} eq "MOVED") ) { ! if ( (defined $::COOKIE{"Bugzilla_login"}) ! && ($::COOKIE{"Bugzilla_login"} =~ /($movers)/) ){ ! print " Reopen bug
\n"; $knum++; if ($status eq "RESOLVED") { print " ! Mark bug as VERIFIED
\n"; $knum++; } if ($status ne "CLOSED") { print " ! Mark bug as CLOSED
\n"; $knum++; } } } else { ! print " Reopen bug
\n"; $knum++; if ($status eq "RESOLVED") { print " ! Mark bug as VERIFIED
\n"; $knum++; } if ($status ne "CLOSED") { print " ! Mark bug as CLOSED
\n"; $knum++; } } --- 432,507 ---- print ""; my $extra = ""; if ($status eq $::unconfirmedstate && ($canconfirm || $canedit)) { ! $extra = "confirm issue, "; } ! print "Accept issue (${extra}change status to ASSIGNED)
"; $knum++; } ! if ($issue{'resolution'} ne "") { print "\n"; print "Clear the resolution (remove the current resolution of\n"; ! print "$issue{'resolution'})
\n"; $knum++; } my $resolution_popup = make_options(\@::settable_resolution, ! $issue{'resolution'}); print " ! Resolve issue, changing resolution to
\n"; $knum++; print " ! Resolve issue, mark it as duplicate of issue #
\n"; $knum++; ! if ( $issue{'assigned_to'} =~ /(.*)\((.*)\)/ ) { ! $issue{'assigned_to'} = $1; ! chop($issue{'assigned_to'}); } ! my $assign_element = ""; print " ! Reassign issue to $assign_element
\n"; if ($status eq $::unconfirmedstate && ($canconfirm || $canedit)) { ! print "     and confirm issue (change status to NEW)
"; } $knum++; print " ! Reassign issue to owner of selected component
\n"; if ($status eq $::unconfirmedstate && ($canconfirm || $canedit)) { ! print "     and confirm issue (change status to NEW)
"; } $knum++; ! } elsif ( Param("move-enabled") && ($issue{'resolution'} eq "MOVED") ) { ! if ( (defined $::COOKIE{"Issuezilla_login"}) ! && ($::COOKIE{"Issuezilla_login"} =~ /($movers)/) ){ ! print " Reopen issue
\n"; $knum++; if ($status eq "RESOLVED") { print " ! Mark issue as VERIFIED
\n"; $knum++; } if ($status ne "CLOSED") { print " ! Mark issue as CLOSED
\n"; $knum++; } } } else { ! print " Reopen issue
\n"; $knum++; if ($status eq "RESOLVED") { print " ! Mark issue as VERIFIED
\n"; $knum++; } if ($status ne "CLOSED") { print " ! Mark issue as CLOSED
\n"; $knum++; } } *************** *** 510,525 **** print " !

! View Bug Activity   |   ! Format For Printing "; ! if ( Param("move-enabled") && (defined $::COOKIE{"Bugzilla_login"}) && ($::COOKIE{"Bugzilla_login"} =~ /($movers)/) ){ print "  |  " ."\n"; --- 510,525 ---- print " !

! View Issue Activity   |   ! Format For Printing "; ! if ( Param("move-enabled") && (defined $::COOKIE{"Issuezilla_login"}) && ($::COOKIE{"Issuezilla_login"} =~ /($movers)/) ){ print "  |  " ."\n"; *************** *** 529,538 **** print " !
Description:Opened: $bug{'creation_ts'}


"; ! print $bug{'long_desc'}; print "
\n"; --- 529,538 ---- print " !
Description:Opened: $issue{'creation_ts'}

"; ! print $issue{'long_desc'}; print "
\n"; Index: bug_status.html =================================================================== RCS file: /cvsroot/mozilla/webtools/bugzilla/bug_status.html,v retrieving revision 1.11 diff -c -r1.11 bug_status.html *** bug_status.html 2000/08/28 17:48:56 1.11 --- bug_status.html 2000/09/29 04:57:12 *************** *** 12,18 **** 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 --- 12,18 ---- implied. See the License for the specific language governing rights and limitations under the License. ! The Original Code is the Issuezilla Issue Tracking System. The Initial Developer of the Original Code is Netscape Communications Corporation. Portions created by Netscape are *************** *** 24,35 **** Contributor(s): Terry Weissman --> ! A Bug's Life Cycle !

A Bug's Life Cycle

The status and resolution field define and track the ! life cycle of a bug.

--- 24,35 ---- Contributor(s): Terry Weissman --> ! An Issue's Life Cycle !

An Issue's Life Cycle

The status and resolution field define and track the ! life cycle of an issue.

*************** *** 39,75 ****

STATUS

RESOLUTION

The status field indicates the general health of a bug. Only certain status transitions are allowed. ! The resolution field indicates what happened to this bug.
UNCONFIRMED !
This bug has recently been added to the database. Nobody has ! validated that this bug is true. Users who have the "canconfirm" ! permission set may confirm this bug, changing its state to NEW. Or, it may be directly resolved and marked RESOLVED.
NEW !
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 ASSIGNED, passed on to someone else, and remain NEW, or resolved and marked RESOLVED.
ASSIGNED !
This bug is not yet resolved, but is assigned to the proper ! person. From here bugs can be given to another person and become NEW, or resolved and become RESOLVED.
REOPENED !
This bug was once resolved, but the resolution was deemed ! incorrect. For example, a WORKSFORME bug is ! REOPENED when more information shows up and the bug is now ! reproducible. From here bugs are either marked ASSIGNED or RESOLVED.
!
No resolution yet. All bugs which are in one of these "open" states ! have the resolution set to blank. All other bugs will be marked with one of the following resolutions.
--- 39,75 ----

STATUS

RESOLUTION

The status field indicates the general health of an issue. Only certain status transitions are allowed. ! The resolution field indicates what happened to this issue.
UNCONFIRMED !
This issue has recently been added to the database. Nobody has ! validated that this issue is true. Users who have the "canconfirm" ! permission set may confirm this issue, changing its state to NEW. Or, it may be directly resolved and marked RESOLVED.
NEW !
This issue has recently been added to the assignee's list of issues ! and must be processed. Issues in this state may be accepted, and become ASSIGNED, passed on to someone else, and remain NEW, or resolved and marked RESOLVED.
ASSIGNED !
This issue is not yet resolved, but is assigned to the proper ! person. From here issues can be given to another person and become NEW, or resolved and become RESOLVED.
REOPENED !
This issue was once resolved, but the resolution was deemed ! incorrect. For example, a WORKSFORME issue is ! REOPENED when more information shows up and the issue is now ! reproducible. From here issues are either marked ASSIGNED or RESOLVED.
!
No resolution yet. All issues which are in one of these "open" states ! have the resolution set to blank. All other issues will be marked with one of the following resolutions.
*************** *** 77,118 ****
RESOLVED
A resolution has been taken, and it is awaiting verification by ! QA. From here bugs are either re-opened and become REOPENED, are marked VERIFIED, or are closed for good and marked CLOSED.
VERIFIED !
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 ships, at which point they become CLOSED.
CLOSED !
The bug is considered dead, the resolution is correct. Any zombie ! bugs who choose to walk the earth again must do so by becoming REOPENED.
FIXED !
A fix for this bug is checked into the tree and tested.
INVALID !
The problem described is not a bug
WONTFIX !
The problem described is a bug which will never be fixed.
LATER !
The problem described is a bug which will not be fixed in this version of the product.
REMIND !
The problem described is a bug which will probably not be fixed in this version of the product, but might still be.
DUPLICATE !
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.
WORKSFORME !
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.
--- 77,118 ----
RESOLVED
A resolution has been taken, and it is awaiting verification by ! QA. From here issues are either re-opened and become REOPENED, are marked VERIFIED, or are closed for good and marked CLOSED.
VERIFIED !
QA has looked at the issue and the resolution and agrees that the ! appropriate resolution has been taken. Issues remain in this state until the product they were reported against actually ships, at which point they become CLOSED.
CLOSED !
The issue is considered dead, the resolution is correct. Any zombie ! issues who choose to walk the earth again must do so by becoming REOPENED.
FIXED !
A fix for this issue is checked into the tree and tested.
INVALID !
The problem described is not an issue
WONTFIX !
The problem described is an issue which will never be fixed.
LATER !
The problem described is an issue which will not be fixed in this version of the product.
REMIND !
The problem described is an issue which will probably not be fixed in this version of the product, but might still be.
DUPLICATE !
The problem is a duplicate of an existing issue. Marking an issue ! duplicate requires the issue# of the duplicating issue and will at ! least put that issue number in the description field.
WORKSFORME !
All attempts at reproducing this issue were futile, reading the code produces no clues as to why this behavior would occur. If ! more information appears later, please re-assign the issue, for now, file it.
*************** *** 120,146 ****

Other Fields

!

Severity

! This field describes the impact of a bug.

!
BlockerBlocks development and/or testing work !
Criticalcrashes, loss of data, severe memory leak !
Majormajor loss of function !
Minorminor loss of function, or other problem where easy workaround is present !
Trivialcosmetic problem like misspelled words or misaligned text !
EnhancementRequest for enhancement

Priority

! This field describes the importance and order in which a bug should be fixed. This field is utilized by the programmers/engineers to prioritized their work to be done. The available priorities are: --- 120,145 ----

Other Fields

!

Issue Type

! This field describes the type of issue.

!
Defectan issue in existing feature/functionality !
EnhancementImprovement to existing feature !
FeatureA new feature !
TaskA task associated with instantiation, or in support of a feature/enhancement/issue. !
PatchA software patch submitted to fix a defect.

Priority

! This field describes the importance and order in which an issue should be fixed. This field is utilized by the programmers/engineers to prioritized their work to be done. The available priorities are: *************** *** 157,182 ****

Platform

! This is the hardware platform against which the bug was reported. Legal platforms include:
    !
  • All (happens on all platform; cross-platform bug)
  • Macintosh
  • PC
  • Sun
  • HP
! Note: Selecting the option "All" does not select bugs assigned against all platforms. It ! merely selects bugs that occur on all platforms.

Operating System

! This is the operating system against which the bug was reported. Legal operating systems include:
    !
  • All (happens on all operating systems; cross-platform bug)
  • Windows 95
  • Mac System 8.0
  • Linux --- 156,181 ----

Platform

! This is the hardware platform against which the issue was reported. Legal platforms include:
    !
  • All (happens on all platform; cross-platform issue)
  • Macintosh
  • PC
  • Sun
  • HP
! Note: Selecting the option "All" does not select issues assigned against all platforms. It ! merely selects issues that occur on all platforms.

Operating System

! This is the operating system against which the issue was reported. Legal operating systems include:
    !
  • All (happens on all operating systems; cross-platform issue)
  • Windows 95
  • Mac System 8.0
  • Linux *************** *** 187,202 ****

    Assigned To

    ! This is the person in charge of resolving the bug. Every time this field changes, the status changes to NEW to make it easy to see ! which new bugs have appeared on a person's list. 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.
    ! Last modified: Wed Feb 16 20:41:24 2000 --- 186,201 ----

    Assigned To

    ! This is the person in charge of resolving the issue. Every time this field changes, the status changes to NEW to make it easy to see ! which new issues have appeared on a person's list. The default status for queries is set to NEW, ASSIGNED and REOPENED. When ! searching for issues that have been resolved or verified, remember to set the status field appropriately.
    ! Last modified: Thu Sep 28 21:39:07 PDT 2000 Index: buglist.cgi =================================================================== RCS file: /cvsroot/mozilla/webtools/bugzilla/buglist.cgi,v retrieving revision 1.119 diff -c -r1.119 buglist.cgi *** buglist.cgi 2000/09/18 21:29:45 1.119 --- buglist.cgi 2000/09/29 04:57:12 *************** *** 1,4 **** ! #!/usr/bonsaitools/bin/perl -w # -*- Mode: perl; indent-tabs-mode: nil -*- # # The contents of this file are subject to the Mozilla Public --- 1,4 ---- ! #!/usr/bin/perl -w # -*- Mode: perl; indent-tabs-mode: nil -*- # # The contents of this file are subject to the Mozilla Public *************** *** 11,17 **** # 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 --- 11,17 ---- # implied. See the License for the specific language governing # rights and limitations under the License. # ! # The Original Code is the Issuezilla Issue Tracking System. # # The Initial Developer of the Original Code is Netscape Communications # Corporation. Portions created by Netscape are *************** *** 41,47 **** $zz = @::legal_priority; $zz = @::legal_product; $zz = @::settable_resolution; ! $zz = @::legal_severity; $zz = @::versions; $zz = @::target_milestone; }; --- 41,47 ---- $zz = @::legal_priority; $zz = @::legal_product; $zz = @::settable_resolution; ! $zz = @::legal_issue_type; $zz = @::versions; $zz = @::target_milestone; }; *************** *** 50,57 **** ConnectToDatabase(); ! #print "Content-type: text/plain\n\n"; # Handy for debugging. ! #$::FORM{'debug'} = 1; if (grep(/^cmd-/, keys(%::FORM))) { --- 50,57 ---- ConnectToDatabase(); ! #print "Content-type: text/plain\n\n"; # Handy for deissueging. ! #$::FORM{'deissue'} = 1; if (grep(/^cmd-/, keys(%::FORM))) { *************** *** 121,127 **** sub GenerateSQL { ! my $debug = 0; my ($fieldsref, $supptablesref, $wherepartref, $urlstr) = (@_); my @fields; my @supptables; --- 121,127 ---- sub GenerateSQL { ! my $deissue = 0; my ($fieldsref, $supptablesref, $wherepartref, $urlstr) = (@_); my @fields; my @supptables; *************** *** 140,150 **** unshift(@supptables, ("profiles map_assigned_to", "profiles map_reporter", ! "LEFT JOIN profiles map_qa_contact ON bugs.qa_contact = map_qa_contact.userid")); unshift(@wherepart, ! ("bugs.assigned_to = map_assigned_to.userid", ! "bugs.reporter = map_reporter.userid", ! "bugs.groupset & $::usergroupset = bugs.groupset")); my $minvotes; --- 140,150 ---- unshift(@supptables, ("profiles map_assigned_to", "profiles map_reporter", ! "LEFT JOIN profiles map_qa_contact ON issues.qa_contact = map_qa_contact.userid")); unshift(@wherepart, ! ("issues.assigned_to = map_assigned_to.userid", ! "issues.reporter = map_reporter.userid", ! "issues.groupset & $::usergroupset = issues.groupset")); my $minvotes; *************** *** 160,171 **** } } ! if ($M{'bug_id'}) { my $type = "anyexact"; ! if ($F{'bugidtype'} && $F{'bugidtype'} eq 'exclude') { $type = "nowords"; } ! push(@specialchart, ["bug_id", $type, join(',', @{$M{'bug_id'}})]); } if (defined $F{'sql'}) { --- 160,171 ---- } } ! if ($M{'issue_id'}) { my $type = "anyexact"; ! if ($F{'issueidtype'} && $F{'issueidtype'} eq 'exclude') { $type = "nowords"; } ! push(@specialchart, ["issue_id", $type, join(',', @{$M{'issue_id'}})]); } if (defined $F{'sql'}) { *************** *** 174,180 **** } my @legal_fields = ("product", "version", "rep_platform", "op_sys", ! "bug_status", "resolution", "priority", "bug_severity", "assigned_to", "reporter", "component", "target_milestone", "groupset"); --- 174,180 ---- } my @legal_fields = ("product", "version", "rep_platform", "op_sys", ! "issue_status", "resolution", "priority", "issue_type", "assigned_to", "reporter", "component", "target_milestone", "groupset"); *************** *** 221,227 **** if ($F{"emaillongdesc$id"}) { my $table = "longdescs_"; push(@supptables, "longdescs $table"); ! push(@wherepart, "$table.bug_id = bugs.bug_id"); my $ptable = "longdescnames_"; push(@supptables, "LEFT JOIN profiles $ptable ON $table.who = $ptable.userid"); --- 221,227 ---- if ($F{"emaillongdesc$id"}) { my $table = "longdescs_"; push(@supptables, "longdescs $table"); ! push(@wherepart, "$table.issue_id = issues.issue_id"); my $ptable = "longdescnames_"; push(@supptables, "LEFT JOIN profiles $ptable ON $table.who = $ptable.userid"); *************** *** 252,258 **** my $ref = $M{'chfield'}; if (defined $ref) { ! my $which = lsearch($ref, "[Bug creation]"); if ($which >= 0) { splice(@$ref, $which, 1); push(@specialchart, ["creation_ts", "greaterthan", --- 252,258 ---- my $ref = $M{'chfield'}; if (defined $ref) { ! my $which = lsearch($ref, "[Issue creation]"); if ($which >= 0) { splice(@$ref, $which, 1); push(@specialchart, ["creation_ts", "greaterthan", *************** *** 271,291 **** if (defined $ref && 0 < @$ref) { ! push(@supptables, "bugs_activity actcheck"); my @list; foreach my $f (@$ref) { push(@list, "\nactcheck.fieldid = " . GetFieldID($f)); } ! push(@wherepart, "actcheck.bug_id = bugs.bug_id"); push(@wherepart, "(" . join(' OR ', @list) . ")"); ! push(@wherepart, "actcheck.bug_when >= " . SqlQuote(SqlifyDate($F{'chfieldfrom'}))); my $to = $F{'chfieldto'}; if (defined $to) { $to = trim($to); if ($to ne "" && $to !~ /^now$/i) { ! push(@wherepart, "actcheck.bug_when <= " . SqlQuote(SqlifyDate($to))); } } --- 271,291 ---- if (defined $ref && 0 < @$ref) { ! push(@supptables, "issues_activity actcheck"); my @list; foreach my $f (@$ref) { push(@list, "\nactcheck.fieldid = " . GetFieldID($f)); } ! push(@wherepart, "actcheck.issue_id = issues.issue_id"); push(@wherepart, "(" . join(' OR ', @list) . ")"); ! push(@wherepart, "actcheck.issue_when >= " . SqlQuote(SqlifyDate($F{'chfieldfrom'}))); my $to = $F{'chfieldto'}; if (defined $to) { $to = trim($to); if ($to ne "" && $to !~ /^now$/i) { ! push(@wherepart, "actcheck.issue_when <= " . SqlQuote(SqlifyDate($to))); } } *************** *** 300,306 **** } ! foreach my $f ("short_desc", "long_desc", "bug_file_loc", "status_whiteboard") { if (defined $F{$f}) { my $s = trim($F{$f}); --- 300,306 ---- } ! foreach my $f ("short_desc", "long_desc", "issue_file_loc", "status_whiteboard") { if (defined $F{$f}) { my $s = trim($F{$f}); *************** *** 326,372 **** ( "^(assigned_to|reporter)," => sub { push(@supptables, "profiles map_$f"); ! push(@wherepart, "bugs.$f = map_$f.userid"); $f = "map_$f.login_name"; }, "^qa_contact," => sub { push(@supptables, ! "LEFT JOIN profiles map_qa_contact ON bugs.qa_contact = map_qa_contact.userid"); $f = "map_$f.login_name"; }, "^cc," => sub { push(@supptables, ! ("LEFT JOIN cc cc_$chartid ON bugs.bug_id = cc_$chartid.bug_id LEFT JOIN profiles map_cc_$chartid ON cc_$chartid.who = map_cc_$chartid.userid")); $f = "map_cc_$chartid.login_name"; }, "^long_?desc,changedby" => sub { my $table = "longdescs_$chartid"; push(@supptables, "longdescs $table"); ! push(@wherepart, "$table.bug_id = bugs.bug_id"); my $id = DBNameToIdAndCheck($v); $term = "$table.who = $id"; }, "^long_?desc,changedbefore" => sub { my $table = "longdescs_$chartid"; push(@supptables, "longdescs $table"); ! push(@wherepart, "$table.bug_id = bugs.bug_id"); ! $term = "$table.bug_when < " . SqlQuote(SqlifyDate($v)); }, "^long_?desc,changedafter" => sub { my $table = "longdescs_$chartid"; push(@supptables, "longdescs $table"); ! push(@wherepart, "$table.bug_id = bugs.bug_id"); ! $term = "$table.bug_when > " . SqlQuote(SqlifyDate($v)); }, "^long_?desc," => sub { my $table = "longdescs_$chartid"; push(@supptables, "longdescs $table"); ! push(@wherepart, "$table.bug_id = bugs.bug_id"); $f = "$table.thetext"; }, "^attachments\..*," => sub { my $table = "attachments_$chartid"; ! push(@supptables, "LEFT JOIN attachments $table ON bugs.bug_id = $table.bug_id"); $f =~ m/^attachments\.(.*)$/; my $field = $1; if ($t eq "changedby") { --- 326,372 ---- ( "^(assigned_to|reporter)," => sub { push(@supptables, "profiles map_$f"); ! push(@wherepart, "issues.$f = map_$f.userid"); $f = "map_$f.login_name"; }, "^qa_contact," => sub { push(@supptables, ! "LEFT JOIN profiles map_qa_contact ON issues.qa_contact = map_qa_contact.userid"); $f = "map_$f.login_name"; }, "^cc," => sub { push(@supptables, ! ("LEFT JOIN cc cc_$chartid ON issues.issue_id = cc_$chartid.issue_id LEFT JOIN profiles map_cc_$chartid ON cc_$chartid.who = map_cc_$chartid.userid")); $f = "map_cc_$chartid.login_name"; }, "^long_?desc,changedby" => sub { my $table = "longdescs_$chartid"; push(@supptables, "longdescs $table"); ! push(@wherepart, "$table.issue_id = issues.issue_id"); my $id = DBNameToIdAndCheck($v); $term = "$table.who = $id"; }, "^long_?desc,changedbefore" => sub { my $table = "longdescs_$chartid"; push(@supptables, "longdescs $table"); ! push(@wherepart, "$table.issue_id = issues.issue_id"); ! $term = "$table.issue_when < " . SqlQuote(SqlifyDate($v)); }, "^long_?desc,changedafter" => sub { my $table = "longdescs_$chartid"; push(@supptables, "longdescs $table"); ! push(@wherepart, "$table.issue_id = issues.issue_id"); ! $term = "$table.issue_when > " . SqlQuote(SqlifyDate($v)); }, "^long_?desc," => sub { my $table = "longdescs_$chartid"; push(@supptables, "longdescs $table"); ! push(@wherepart, "$table.issue_id = issues.issue_id"); $f = "$table.thetext"; }, "^attachments\..*," => sub { my $table = "attachments_$chartid"; ! push(@supptables, "LEFT JOIN attachments $table ON issues.issue_id = $table.issue_id"); $f =~ m/^attachments\.(.*)$/; my $field = $1; if ($t eq "changedby") { *************** *** 393,399 **** $f = "$table.$field"; }, "^changedin," => sub { ! $f = "(to_days(now()) - to_days(bugs.delta_ts))"; }, "^keywords," => sub { --- 393,399 ---- $f = "$table.$field"; }, "^changedin," => sub { ! $f = "(to_days(now()) - to_days(issues.delta_ts))"; }, "^keywords," => sub { *************** *** 429,435 **** } if ($term) { push(@supptables, "keywords $table"); ! push(@wherepart, "$table.bug_id = bugs.bug_id"); } }, --- 429,435 ---- } if ($term) { push(@supptables, "keywords $table"); ! push(@wherepart, "$table.issue_id = issues.issue_id"); } }, *************** *** 494,529 **** ",changedbefore" => sub { my $table = "act_$chartid"; my $ftable = "fielddefs_$chartid"; ! push(@supptables, "bugs_activity $table"); push(@supptables, "fielddefs $ftable"); ! push(@wherepart, "$table.bug_id = bugs.bug_id"); push(@wherepart, "$table.fieldid = $ftable.fieldid"); ! $term = "($ftable.name = '$f' AND $table.bug_when < $q)"; }, ",changedafter" => sub { my $table = "act_$chartid"; my $ftable = "fielddefs_$chartid"; ! push(@supptables, "bugs_activity $table"); push(@supptables, "fielddefs $ftable"); ! push(@wherepart, "$table.bug_id = bugs.bug_id"); push(@wherepart, "$table.fieldid = $ftable.fieldid"); ! $term = "($ftable.name = '$f' AND $table.bug_when > $q)"; }, ",changedto" => sub { my $table = "act_$chartid"; my $ftable = "fielddefs_$chartid"; ! push(@supptables, "bugs_activity $table"); push(@supptables, "fielddefs $ftable"); ! push(@wherepart, "$table.bug_id = bugs.bug_id"); push(@wherepart, "$table.fieldid = $ftable.fieldid"); $term = "($ftable.name = '$f' AND $table.newvalue = $q)"; }, ",changedby" => sub { my $table = "act_$chartid"; my $ftable = "fielddefs_$chartid"; ! push(@supptables, "bugs_activity $table"); push(@supptables, "fielddefs $ftable"); ! push(@wherepart, "$table.bug_id = bugs.bug_id"); push(@wherepart, "$table.fieldid = $ftable.fieldid"); my $id = DBNameToIdAndCheck($v); $term = "($ftable.name = '$f' AND $table.who = $id)"; --- 494,529 ---- ",changedbefore" => sub { my $table = "act_$chartid"; my $ftable = "fielddefs_$chartid"; ! push(@supptables, "issues_activity $table"); push(@supptables, "fielddefs $ftable"); ! push(@wherepart, "$table.issue_id = issues.issue_id"); push(@wherepart, "$table.fieldid = $ftable.fieldid"); ! $term = "($ftable.name = '$f' AND $table.issue_when < $q)"; }, ",changedafter" => sub { my $table = "act_$chartid"; my $ftable = "fielddefs_$chartid"; ! push(@supptables, "issues_activity $table"); push(@supptables, "fielddefs $ftable"); ! push(@wherepart, "$table.issue_id = issues.issue_id"); push(@wherepart, "$table.fieldid = $ftable.fieldid"); ! $term = "($ftable.name = '$f' AND $table.issue_when > $q)"; }, ",changedto" => sub { my $table = "act_$chartid"; my $ftable = "fielddefs_$chartid"; ! push(@supptables, "issues_activity $table"); push(@supptables, "fielddefs $ftable"); ! push(@wherepart, "$table.issue_id = issues.issue_id"); push(@wherepart, "$table.fieldid = $ftable.fieldid"); $term = "($ftable.name = '$f' AND $table.newvalue = $q)"; }, ",changedby" => sub { my $table = "act_$chartid"; my $ftable = "fielddefs_$chartid"; ! push(@supptables, "issues_activity $table"); push(@supptables, "fielddefs $ftable"); ! push(@wherepart, "$table.issue_id = issues.issue_id"); push(@wherepart, "$table.fieldid = $ftable.fieldid"); my $id = DBNameToIdAndCheck($v); $term = "($ftable.name = '$f' AND $table.who = $id)"; *************** *** 552,558 **** $F{"field$chart-$row-$col"} = shift(@$ref); $F{"type$chart-$row-$col"} = shift(@$ref); $F{"value$chart-$row-$col"} = shift(@$ref); ! if ($debug) { print qq{

    $F{"field$chart-$row-$col"} | $F{"type$chart-$row-$col"} | $F{"value$chart-$row-$col"}*\n}; } $col++; --- 552,558 ---- $F{"field$chart-$row-$col"} = shift(@$ref); $F{"type$chart-$row-$col"} = shift(@$ref); $F{"value$chart-$row-$col"} = shift(@$ref); ! if ($deissue) { print qq{

    $F{"field$chart-$row-$col"} | $F{"type$chart-$row-$col"} | $F{"value$chart-$row-$col"}*\n}; } $col++; *************** *** 587,601 **** foreach my $key (@funcnames) { if ("$f,$t" =~ m/$key/) { my $ref = $funcsbykey{$key}; ! if ($debug) { print "

    $key ($f , $t ) => "; } $ff = $f; if ($f !~ /\./) { ! $ff = "bugs.$f"; } &$ref; ! if ($debug) { print "$f , $t , $term"; } if ($term) { --- 587,601 ---- foreach my $key (@funcnames) { if ("$f,$t" =~ m/$key/) { my $ref = $funcsbykey{$key}; ! if ($deissue) { print "

    $key ($f , $t ) => "; } $ff = $f; if ($f !~ /\./) { ! $ff = "issues.$f"; } &$ref; ! if ($deissue) { print "$f , $t , $term"; } if ($term) { *************** *** 619,626 **** } } } ! my %suppseen = ("bugs" => 1); ! my $suppstring = "bugs"; foreach my $str (@supptables) { if (!$suppseen{$str}) { if ($str !~ /^LEFT JOIN/i) { --- 619,626 ---- } } } ! my %suppseen = ("issues" => 1); ! my $suppstring = "issues"; foreach my $str (@supptables) { if (!$suppseen{$str}) { if ($str !~ /^LEFT JOIN/i) { *************** *** 633,640 **** my $query = ("SELECT " . join(', ', @fields) . " FROM $suppstring" . " WHERE " . join(' AND ', (@wherepart, @andlist)) . ! " GROUP BY bugs.bug_id"); ! if ($debug) { print "

    " . value_quote($query) . "

    \n"; exit(); } --- 633,640 ---- my $query = ("SELECT " . join(', ', @fields) . " FROM $suppstring" . " WHERE " . join(' AND ', (@wherepart, @andlist)) . ! " GROUP BY issues.issue_id"); ! if ($deissue) { print "

    " . value_quote($query) . "

    \n"; exit(); } *************** *** 646,652 **** sub LookupNamedQuery { my ($name) = (@_); confirm_login(); ! my $userid = DBNameToIdAndCheck($::COOKIE{"Bugzilla_login"}); SendSQL("SELECT query FROM namedqueries " . "WHERE userid = $userid AND name = " . SqlQuote($name)); my $result = FetchOneColumn(); --- 646,652 ---- sub LookupNamedQuery { my ($name) = (@_); confirm_login(); ! my $userid = DBNameToIdAndCheck($::COOKIE{"Issuezilla_login"}); SendSQL("SELECT query FROM namedqueries " . "WHERE userid = $userid AND name = " . SqlQuote($name)); my $result = FetchOneColumn(); *************** *** 662,673 **** ! $::querytitle = "Bug List"; CMD: for ($::FORM{'cmdtype'}) { /^runnamed$/ && do { $::buffer = LookupNamedQuery($::FORM{"namedcmd"}); ! $::querytitle = "Bug List: $::FORM{'namedcmd'}"; ProcessFormFields($::buffer); last CMD; }; --- 662,673 ---- ! $::querytitle = "Issue List"; CMD: for ($::FORM{'cmdtype'}) { /^runnamed$/ && do { $::buffer = LookupNamedQuery($::FORM{"namedcmd"}); ! $::querytitle = "Issue List: $::FORM{'namedcmd'}"; ProcessFormFields($::buffer); last CMD; }; *************** *** 683,689 **** }; /^forgetnamed$/ && do { confirm_login(); ! my $userid = DBNameToIdAndCheck($::COOKIE{"Bugzilla_login"}); SendSQL("DELETE FROM namedqueries WHERE userid = $userid " . "AND name = " . SqlQuote($::FORM{'namedcmd'})); --- 683,689 ---- }; /^forgetnamed$/ && do { confirm_login(); ! my $userid = DBNameToIdAndCheck($::COOKIE{"Issuezilla_login"}); SendSQL("DELETE FROM namedqueries WHERE userid = $userid " . "AND name = " . SqlQuote($::FORM{'namedcmd'})); *************** *** 700,706 **** }; /^asdefault$/ && do { confirm_login(); ! my $userid = DBNameToIdAndCheck($::COOKIE{"Bugzilla_login"}); print "Content-type: text/html\n\n"; SendSQL("REPLACE INTO namedqueries (userid, name, query) VALUES " . "($userid, '$::defaultqueryname'," . --- 700,706 ---- }; /^asdefault$/ && do { confirm_login(); ! my $userid = DBNameToIdAndCheck($::COOKIE{"Issuezilla_login"}); print "Content-type: text/html\n\n"; SendSQL("REPLACE INTO namedqueries (userid, name, query) VALUES " . "($userid, '$::defaultqueryname'," . *************** *** 717,723 **** }; /^asnamed$/ && do { confirm_login(); ! my $userid = DBNameToIdAndCheck($::COOKIE{"Bugzilla_login"}); print "Content-type: text/html\n\n"; my $name = trim($::FORM{'newqueryname'}); if ($name eq "" || $name =~ /[<>&]/) { --- 717,723 ---- }; /^asnamed$/ && do { confirm_login(); ! my $userid = DBNameToIdAndCheck($::COOKIE{"Issuezilla_login"}); print "Content-type: text/html\n\n"; my $name = trim($::FORM{'newqueryname'}); if ($name eq "" || $name =~ /[<>&]/) { *************** *** 754,760 **** if (exists $ENV{'HTTP_USER_AGENT'} && $ENV{'HTTP_USER_AGENT'} =~ /Mozilla.[3-9]/ && $ENV{'HTTP_USER_AGENT'} !~ /[Cc]ompatible/ ) { # Search for real Netscape 3 and up. http://www.browsercaps.org used as source of # browsers compatbile with server-push. It's a Netscape hack, incompatbile ! # with MSIE and Lynx (at least). Even Communicator 4.51 has bugs with it, # especially during page reload. $serverpush = 1; --- 754,760 ---- if (exists $ENV{'HTTP_USER_AGENT'} && $ENV{'HTTP_USER_AGENT'} =~ /Mozilla.[3-9]/ && $ENV{'HTTP_USER_AGENT'} !~ /[Cc]ompatible/ ) { # Search for real Netscape 3 and up. http://www.browsercaps.org used as source of # browsers compatbile with server-push. It's a Netscape hack, incompatbile ! # with MSIE and Lynx (at least). Even Communicator 4.51 has issues with it, # especially during page reload. $serverpush = 1; *************** *** 767,773 **** print "Content-type: text/html\n"; #Changing attachment to inline to resolve 46897 #zach@zachlipton.com ! print "Content-disposition: inline; filename=bugzilla_bug_list.html\n"; # Note! Don't finish HTML header yet! Only one newline so far! } --- 767,773 ---- print "Content-type: text/html\n"; #Changing attachment to inline to resolve 46897 #zach@zachlipton.com ! print "Content-disposition: inline; filename=issuezilla_issue_list.html\n"; # Note! Don't finish HTML header yet! Only one newline so far! } *************** *** 785,819 **** $::needquote{$name} = $q; } ! DefCol("opendate", "date_format(bugs.creation_ts,'%Y-%m-%d')", "Opened", ! "bugs.creation_ts"); ! DefCol("changeddate", "date_format(bugs.delta_ts,'%Y-%m-%d')", "Changed", ! "bugs.delta_ts"); ! DefCol("severity", "substring(bugs.bug_severity, 1, 3)", "Sev", ! "bugs.bug_severity"); ! DefCol("priority", "substring(bugs.priority, 1, 3)", "Pri", "bugs.priority"); ! DefCol("platform", "substring(bugs.rep_platform, 1, 3)", "Plt", ! "bugs.rep_platform"); DefCol("owner", "map_assigned_to.login_name", "Owner", "map_assigned_to.login_name"); DefCol("reporter", "map_reporter.login_name", "Reporter", "map_reporter.login_name"); DefCol("qa_contact", "map_qa_contact.login_name", "QAContact", "map_qa_contact.login_name"); ! DefCol("status", "substring(bugs.bug_status,1,4)", "State", "bugs.bug_status"); ! DefCol("resolution", "substring(bugs.resolution,1,4)", "Result", ! "bugs.resolution"); ! DefCol("summary", "substring(bugs.short_desc, 1, 60)", "Summary", "bugs.short_desc", 1); ! DefCol("summaryfull", "bugs.short_desc", "Summary", "bugs.short_desc", 1); ! DefCol("status_whiteboard", "bugs.status_whiteboard", "StatusSummary", "bugs.status_whiteboard", 1); ! DefCol("component", "substring(bugs.component, 1, 8)", "Comp", ! "bugs.component"); ! DefCol("product", "substring(bugs.product, 1, 8)", "Product", "bugs.product"); ! DefCol("version", "substring(bugs.version, 1, 5)", "Vers", "bugs.version"); ! DefCol("os", "substring(bugs.op_sys, 1, 4)", "OS", "bugs.op_sys"); ! DefCol("target_milestone", "bugs.target_milestone", "TargetM", ! "bugs.target_milestone"); ! DefCol("votes", "bugs.votes", "Votes", "bugs.votes desc"); ! DefCol("keywords", "bugs.keywords", "Keywords", "bugs.keywords", 5); my @collist; if (defined $::COOKIE{'COLUMNLIST'}) { --- 785,819 ---- $::needquote{$name} = $q; } ! DefCol("opendate", "date_format(issues.creation_ts,'%Y-%m-%d')", "Opened", ! "issues.creation_ts"); ! DefCol("changeddate", "date_format(issues.delta_ts,'%Y-%m-%d')", "Changed", ! "issues.delta_ts"); ! DefCol("issue_type", "substring(issues.issue_type, 1, 6)", "Type", ! "issues.issue_type"); ! DefCol("priority", "substring(issues.priority, 1, 3)", "Pri", "issues.priority"); ! DefCol("platform", "substring(issues.rep_platform, 1, 3)", "Plt", ! "issues.rep_platform"); DefCol("owner", "map_assigned_to.login_name", "Owner", "map_assigned_to.login_name"); DefCol("reporter", "map_reporter.login_name", "Reporter", "map_reporter.login_name"); DefCol("qa_contact", "map_qa_contact.login_name", "QAContact", "map_qa_contact.login_name"); ! DefCol("status", "substring(issues.issue_status,1,4)", "State", "issues.issue_status"); ! DefCol("resolution", "substring(issues.resolution,1,4)", "Result", ! "issues.resolution"); ! DefCol("summary", "substring(issues.short_desc, 1, 60)", "Summary", "issues.short_desc", 1); ! DefCol("summaryfull", "issues.short_desc", "Summary", "issues.short_desc", 1); ! DefCol("status_whiteboard", "issues.status_whiteboard", "StatusSummary", "issues.status_whiteboard", 1); ! DefCol("component", "substring(issues.component, 1, 8)", "Comp", ! "issues.component"); ! DefCol("product", "substring(issues.product, 1, 8)", "Product", "issues.product"); ! DefCol("version", "substring(issues.version, 1, 5)", "Vers", "issues.version"); ! DefCol("os", "substring(issues.op_sys, 1, 4)", "OS", "issues.op_sys"); ! DefCol("target_milestone", "issues.target_milestone", "TargetM", ! "issues.target_milestone"); ! DefCol("votes", "issues.votes", "Votes", "issues.votes desc"); ! DefCol("keywords", "issues.keywords", "Keywords", "issues.keywords", 5); my @collist; if (defined $::COOKIE{'COLUMNLIST'}) { *************** *** 836,844 **** if ($dotweak) { confirm_login(); ! if (!UserInGroup("editbugs")) { print qq{ ! Sorry; you do not have sufficient priviledges to edit a bunch of bugs at once. }; PutFooter(); --- 836,844 ---- if ($dotweak) { confirm_login(); ! if (!UserInGroup("editissues")) { print qq{ ! Sorry; you do not have sufficient priviledges to edit a bunch of issues at once. }; PutFooter(); *************** *** 849,855 **** } ! my @fields = ("bugs.bug_id", "bugs.groupset"); foreach my $c (@collist) { if (exists $::needquote{$c}) { --- 849,855 ---- } ! my @fields = ("issues.issue_id", "issues.groupset"); foreach my $c (@collist) { if (exists $::needquote{$c}) { *************** *** 859,871 **** if ($dotweak) { ! push(@fields, "bugs.product", "bugs.bug_status"); } if ($::FORM{'regetlastlist'}) { ! if (!$::COOKIE{'BUGLIST'}) { print qq{ Sorry, I seem to have lost the cookie that recorded the results of your last query. You will have to start over at the query page. --- 859,871 ---- if ($dotweak) { ! push(@fields, "issues.product", "issues.issue_status"); } if ($::FORM{'regetlastlist'}) { ! if (!$::COOKIE{'ISSUELIST'}) { print qq{ Sorry, I seem to have lost the cookie that recorded the results of your last query. You will have to start over at the query page. *************** *** 873,884 **** PutFooter(); exit; } ! my @list = split(/:/, $::COOKIE{'BUGLIST'}); ! $::FORM{'bug_id'} = join(',', @list); if (!$::FORM{'order'}) { $::FORM{'order'} = 'reuse last sort'; } ! $::buffer = "bug_id=" . $::FORM{'bug_id'} . "&order=" . url_quote($::FORM{'order'}); } --- 873,884 ---- PutFooter(); exit; } ! my @list = split(/:/, $::COOKIE{'ISSUELIST'}); ! $::FORM{'issue_id'} = join(',', @list); if (!$::FORM{'order'}) { $::FORM{'order'} = 'reuse last sort'; } ! $::buffer = "issue_id=" . $::FORM{'issue_id'} . "&order=" . url_quote($::FORM{'order'}); } *************** *** 899,905 **** if (defined $::FORM{'order'} && $::FORM{'order'} ne "") { $query .= " ORDER BY "; ! $::FORM{'order'} =~ s/votesum/bugs.votes/; # Silly backwards compatability # hack. $::FORM{'order'} =~ s/assign\.login_name/map_assigned_to.login_name/g; # Another backwards compatability hack. --- 899,905 ---- if (defined $::FORM{'order'} && $::FORM{'order'} ne "") { $query .= " ORDER BY "; ! $::FORM{'order'} =~ s/votesum/issues.votes/; # Silly backwards compatability # hack. $::FORM{'order'} =~ s/assign\.login_name/map_assigned_to.login_name/g; # Another backwards compatability hack. *************** *** 910,928 **** last ORDER; }; /Number/ && do { ! $::FORM{'order'} = "bugs.bug_id"; last ORDER; }; /Import/ && do { ! $::FORM{'order'} = "bugs.priority, bugs.bug_severity"; last ORDER; }; /Assign/ && do { ! $::FORM{'order'} = "map_assigned_to.login_name, bugs.bug_status, priority, bugs.bug_id"; last ORDER; }; # DEFAULT ! $::FORM{'order'} = "bugs.bug_status, bugs.priority, map_assigned_to.login_name, bugs.bug_id"; } die "Invalid order: $::FORM{'order'}" unless $::FORM{'order'} =~ /^([a-zA-Z0-9_., ]+)$/; --- 910,928 ---- last ORDER; }; /Number/ && do { ! $::FORM{'order'} = "issues.issue_id"; last ORDER; }; /Import/ && do { ! $::FORM{'order'} = "issues.priority, issues.issue_type"; last ORDER; }; /Assign/ && do { ! $::FORM{'order'} = "map_assigned_to.login_name, issues.issue_status, priority, issues.issue_id"; last ORDER; }; # DEFAULT ! $::FORM{'order'} = "issues.issue_status, issues.priority, map_assigned_to.login_name, issues.issue_id"; } die "Invalid order: $::FORM{'order'}" unless $::FORM{'order'} =~ /^([a-zA-Z0-9_., ]+)$/; *************** *** 930,945 **** # Extra special disgusting hack: if we are ordering by target_milestone, # change it to order by the sortkey of the target_milestone first. my $order = $::FORM{'order'}; ! if ($order =~ /bugs.target_milestone/) { ! $query =~ s/ WHERE / LEFT JOIN milestones ms_order ON ms_order.value = bugs.target_milestone AND ms_order.product = bugs.product WHERE /; ! $order =~ s/bugs.target_milestone/ms_order.sortkey,ms_order.value/; } $query .= $order; } ! if ($::FORM{'debug'} && $serverpush) { print "

    " . value_quote($query) . "

    \n"; } --- 930,945 ---- # Extra special disgusting hack: if we are ordering by target_milestone, # change it to order by the sortkey of the target_milestone first. my $order = $::FORM{'order'}; ! if ($order =~ /issues.target_milestone/) { ! $query =~ s/ WHERE / LEFT JOIN milestones ms_order ON ms_order.value = issues.target_milestone AND ms_order.product = issues.product WHERE /; ! $order =~ s/issues.target_milestone/ms_order.sortkey,ms_order.value/; } $query .= $order; } ! if ($::FORM{'deissue'} && $serverpush) { print "

    " . value_quote($query) . "

    \n"; } *************** *** 950,959 **** SendSQL($query); my $count = 0; ! $::bugl = ""; sub pnl { my ($str) = (@_); ! $::bugl .= $str; } my $fields = $::buffer; --- 950,959 ---- SendSQL($query); my $count = 0; ! $::issuel = ""; sub pnl { my ($str) = (@_); ! $::issuel .= $str; } my $fields = $::buffer; *************** *** 993,999 **** my $tablestart = "
    ! ID"; my $splitheader = 0; if ($::COOKIE{'SPLITHEADER'}) { --- 993,999 ---- my $tablestart = "
    ! ID"; my $splitheader = 0; if ($::COOKIE{'SPLITHEADER'}) { *************** *** 1022,1093 **** my @row; my %seen; ! my @bugarray; my %prodhash; my %statushash; ! my $buggroupset = ""; my %ownerhash; my $pricol = -1; ! my $sevcol = -1; for (my $colcount = 0 ; $colcount < @collist ; $colcount++) { my $colname = $collist[$colcount]; if ($colname eq "priority") { $pricol = $colcount; } ! if ($colname eq "severity") { ! $sevcol = $colcount; } } while (@row = FetchSQLData()) { ! my $bug_id = shift @row; ! my $g = shift @row; # Bug's group set. ! if ($buggroupset eq "") { ! $buggroupset = $g; ! } elsif ($buggroupset ne $g) { ! $buggroupset = "x"; # We only play games with tweaking the ! # buggroupset if all the bugs have exactly # the same group. If they don't, we leave # it alone. } ! if (!defined $seen{$bug_id}) { ! $seen{$bug_id} = 1; $count++; if ($count % 200 == 0) { # Too big tables take too much browser memory... pnl "
    $tablestart"; } ! push @bugarray, $bug_id; ! # retrieve this bug's priority and severity, if available, # by looping through all column names -- gross but functional my $priority = "unknown"; ! my $severity; if ($pricol >= 0) { $priority = $row[$pricol]; } ! if ($sevcol >= 0) { ! $severity = $row[$sevcol]; } my $customstyle = ""; ! if ($severity) { ! if ($severity eq "enhan") { $customstyle = "style='font-style:italic ! important'"; } ! if ($severity eq "block") { $customstyle = "style='color:red ! important; font-weight:bold ! important'"; } ! if ($severity eq "criti") { $customstyle = "style='color:red; ! important'"; } } pnl "
    "; if ($dotweak) { ! pnl ""; } ! pnl ""; ! pnl "$bug_id"; if ($g != "0") { pnl "*"; } pnl " "; foreach my $c (@collist) { --- 1022,1093 ---- my @row; my %seen; ! my @issuearray; my %prodhash; my %statushash; ! my $issuegroupset = ""; my %ownerhash; my $pricol = -1; ! my $typecol = -1; for (my $colcount = 0 ; $colcount < @collist ; $colcount++) { my $colname = $collist[$colcount]; if ($colname eq "priority") { $pricol = $colcount; } ! if ($colname eq "issue_type") { ! $typecol = $colcount; } } while (@row = FetchSQLData()) { ! my $issue_id = shift @row; ! my $g = shift @row; # Issue's group set. ! if ($issuegroupset eq "") { ! $issuegroupset = $g; ! } elsif ($issuegroupset ne $g) { ! $issuegroupset = "x"; # We only play games with tweaking the ! # issuegroupset if all the issues have exactly # the same group. If they don't, we leave # it alone. } ! if (!defined $seen{$issue_id}) { ! $seen{$issue_id} = 1; $count++; if ($count % 200 == 0) { # Too big tables take too much browser memory... pnl "
    $tablestart"; } ! push @issuearray, $issue_id; ! # retrieve this issue's priority and issue type, if available, # by looping through all column names -- gross but functional my $priority = "unknown"; ! my $issue_type; if ($pricol >= 0) { $priority = $row[$pricol]; } ! if ($typecol >= 0) { ! $issue_type = $row[$typecol]; } my $customstyle = ""; ! if ($issue_type) { ! if ($issue_type eq "ENHANCEMENT") { $customstyle = "style='font-style:italic ! important'"; } ! if ($issue_type eq "DEFECT") { $customstyle = "style='color:red ! important; font-weight:bold ! important'"; } ! if ($issue_type eq "PATCH") { $customstyle = "style='color:red; ! important'"; } } pnl ""; if ($dotweak) { ! pnl ""; } ! pnl ""; ! pnl "$issue_id"; if ($g != "0") { pnl "*"; } pnl " "; foreach my $c (@collist) { *************** *** 1118,1124 **** pnl "\n"; } } ! my $buglist = join(":", @bugarray); # This is stupid. We really really need to move the quip list into the DB! --- 1118,1124 ---- pnl "\n"; } } ! my $issuelist = join(":", @issuearray); # This is stupid. We really really need to move the quip list into the DB! *************** *** 1132,1138 **** close COMMENTS; $quip = $cdata[int(rand($#cdata + 1))]; } ! $quip ||= "Bugzilla would like to put a random quip here, but nobody has entered any."; } --- 1132,1138 ---- close COMMENTS; $quip = $cdata[int(rand($#cdata + 1))]; } ! $quip ||= "Issuezilla would like to put a random quip here, but nobody has entered any."; } *************** *** 1142,1148 **** print "\n"; print "--thisrandomstring\n"; print "Content-type: text/html\n"; ! print "Content-disposition: inline; filename=bugzilla_bug_list.html\n"; # Note! HTML header not yet closed } my $toolong = 0; --- 1142,1148 ---- print "\n"; print "--thisrandomstring\n"; print "Content-type: text/html\n"; ! print "Content-disposition: inline; filename=issuezilla_issue_list.html\n"; # Note! HTML header not yet closed } my $toolong = 0; *************** *** 1150,1159 **** my $q = url_quote($::FORM{'order'}); print "Set-Cookie: LASTORDER=$q ; path=/; expires=Sun, 30-Jun-2029 00:00:00 GMT\n"; } ! if (length($buglist) < 4000) { ! print "Set-Cookie: BUGLIST=$buglist\n\n"; } else { ! print "Set-Cookie: BUGLIST=\n\n"; $toolong = 1; } PutHeader($::querytitle); --- 1150,1159 ---- my $q = url_quote($::FORM{'order'}); print "Set-Cookie: LASTORDER=$q ; path=/; expires=Sun, 30-Jun-2029 00:00:00 GMT\n"; } ! if (length($issuelist) < 4000) { ! print "Set-Cookie: ISSUELIST=$issuelist\n\n"; } else { ! print "Set-Cookie: ISSUELIST=\n\n"; $toolong = 1; } PutHeader($::querytitle); *************** *** 1163,1178 ****

    " . time2str("%a %b %e %T %Z %Y", time()) . ""; ! if (Param('usebuggroups')) { ! print "
    * next to a bug number notes a bug not visible to everyone.
    "; } ! if (defined $::FORM{'debug'}) { print "

    " . value_quote($query) . "

    \n"; } if ($toolong) { ! print "

    This list is too long for bugzilla's little mind; the\n"; print "Next/Prev/First/Last buttons won't appear.

    \n"; } --- 1163,1178 ----
    " . time2str("%a %b %e %T %Z %Y", time()) . ""; ! if (Param('useissuegroups')) { ! print "
    * next to an issue number notes an issue not visible to everyone.
    "; } ! if (defined $::FORM{'deissue'}) { print "

    " . value_quote($query) . "

    \n"; } if ($toolong) { ! print "

    This list is too long for issuezilla's little mind; the\n"; print "Next/Prev/First/Last buttons won't appear.

    \n"; } *************** *** 1180,1210 **** print "
    $quip
    \n"; } print "
    $tablestart\n"; ! print $::bugl; print "\n"; if ($count == 0) { print "Zarro Boogs found.\n"; # I've been asked to explain this ... way back when, when Netscape released # version 4.0 of its browser, we had a release party. Naturally, there ! # had been a big push to try and fix every known bug before the release. # Naturally, that hadn't actually happened. (This is not unique to # Netscape or to 4.0; the same thing has happened with every software # project I've ever seen.) Anyway, at the release party, T-shirts were # handed out that said something like "Netscape 4.0: Zarro Boogs". ! # Just like the software, the T-shirt had no known bugs. Uh-huh. # ! # So, when you query for a list of bugs, and it gets no results, you ! # can think of this as a friendly reminder. Of *course* there are bugs ! # matching your query, they just aren't in the bugsystem yet... print qq{

    Query Page\n}; ! print qq{  Enter New Bug\n}; print qq{Edit this query\n}; } elsif ($count == 1) { ! print "One bug found.\n"; } else { ! print "$count bugs found.\n"; } if ($dotweak) { --- 1180,1210 ---- print "


    $quip
    \n"; } print "
    $tablestart\n"; ! print $::issuel; print "\n"; if ($count == 0) { print "Zarro Boogs found.\n"; # I've been asked to explain this ... way back when, when Netscape released # version 4.0 of its browser, we had a release party. Naturally, there ! # had been a big push to try and fix every known issue before the release. # Naturally, that hadn't actually happened. (This is not unique to # Netscape or to 4.0; the same thing has happened with every software # project I've ever seen.) Anyway, at the release party, T-shirts were # handed out that said something like "Netscape 4.0: Zarro Boogs". ! # Just like the software, the T-shirt had no known issues. Uh-huh. # ! # So, when you query for a list of issues, and it gets no results, you ! # can think of this as a friendly reminder. Of *course* there are issues ! # matching your query, they just aren't in the issuesystem yet... print qq{

    Query Page\n}; ! print qq{  Enter New Issue\n}; print qq{Edit this query\n}; } elsif ($count == 1) { ! print "One issue found.\n"; } else { ! print "$count issues found.\n"; } if ($dotweak) { *************** *** 1235,1241 **** my $version_popup = make_options(\@legal_versions, $::dontchange); my $platform_popup = make_options(\@::legal_platform, $::dontchange); my $priority_popup = make_options(\@::legal_priority, $::dontchange); ! my $sev_popup = make_options(\@::legal_severity, $::dontchange); my $component_popup = make_options(\@legal_component, $::dontchange); my $product_popup = make_options(\@::legal_product, $::dontchange); --- 1235,1241 ---- my $version_popup = make_options(\@legal_versions, $::dontchange); my $platform_popup = make_options(\@::legal_platform, $::dontchange); my $priority_popup = make_options(\@::legal_priority, $::dontchange); ! my $issuetype_popup = make_options(\@::legal_issue_type, $::dontchange); my $component_popup = make_options(\@legal_component, $::dontchange); my $product_popup = make_options(\@::legal_product, $::dontchange); *************** *** 1257,1264 **** Component: ! Severity: ! "; if (Param("usetargetmilestone")) { --- 1257,1264 ---- Component: ! Issue type: ! "; if (Param("usetargetmilestone")) { *************** *** 1306,1321 ****

    "; ! if ($::usergroupset ne '0' && $buggroupset =~ /^\d+$/) { ! SendSQL("select bit, description, (bit & $buggroupset != 0) from groups where bit & $::usergroupset != 0 and isbuggroup != 0 order by bit"); while (MoreSQLData()) { my ($bit, $description, $ison) = (FetchSQLData()); my $check0 = !$ison ? " SELECTED" : ""; my $check1 = $ison ? " SELECTED" : ""; print "
    \n"; } } --- 1306,1321 ----

    "; ! if ($::usergroupset ne '0' && $issuegroupset =~ /^\d+$/) { ! SendSQL("select bit, description, (bit & $issuegroupset != 0) from groups where bit & $::usergroupset != 0 and isissuegroup != 0 order by bit"); while (MoreSQLData()) { my ($bit, $description, $ison) = (FetchSQLData()); my $check0 = !$ison ? " SELECTED" : ""; my $check1 = $ison ? " SELECTED" : ""; print "
    \n"; } } *************** *** 1333,1344 **** if ($statushash{$::unconfirmedstate} && 1 == scalar(keys(%statushash))) { print " ! Confirm bugs (change status to NEW)
    "; } $knum++; print " ! Accept bugs (change status to ASSIGNED)
    "; $knum++; if (!defined $statushash{'CLOSED'} && !defined $statushash{'VERIFIED'} && --- 1333,1344 ---- if ($statushash{$::unconfirmedstate} && 1 == scalar(keys(%statushash))) { print " ! Confirm issues (change status to NEW)
    "; } $knum++; print " ! Accept issues (change status to ASSIGNED)
    "; $knum++; if (!defined $statushash{'CLOSED'} && !defined $statushash{'VERIFIED'} && *************** *** 1349,1355 **** $knum++; print " ! Resolve bugs, changing resolution to
    "; --- 1349,1355 ---- $knum++; print " ! Resolve issues, changing resolution to
    "; *************** *** 1359,1365 **** !defined $statushash{'ASSIGNED'} && !defined $statushash{'REOPENED'}) { print " ! Reopen bugs
    "; $knum++; } my @statuskeys = keys %statushash; --- 1359,1365 ---- !defined $statushash{'ASSIGNED'} && !defined $statushash{'REOPENED'}) { print " ! Reopen issues
    "; $knum++; } my @statuskeys = keys %statushash; *************** *** 1367,1399 **** if (defined $statushash{'RESOLVED'}) { print " ! Mark bugs as VERIFIED
    "; $knum++; } if (defined $statushash{'VERIFIED'}) { print " ! Mark bugs as CLOSED
    "; $knum++; } } print " ! Reassign bugs to
    "; $knum++; print " ! Reassign bugs to owner of selected component
    "; $knum++; print "

    ! To make changes to a bunch of bugs at once:

      !
    1. Put check boxes next to the bugs you want to change.
    2. Adjust above form elements. (It's always a good idea to add some comment explaining what you're doing.)
    3. Click the below \"Commit\" button. --- 1367,1399 ---- if (defined $statushash{'RESOLVED'}) { print " ! Mark issues as VERIFIED
      "; $knum++; } if (defined $statushash{'VERIFIED'}) { print " ! Mark issues as CLOSED
      "; $knum++; } } print " ! Reassign issues to
      "; $knum++; print " ! Reassign issues to owner of selected component
      "; $knum++; print "

      ! To make changes to a bunch of issues at once:

        !
      1. Put check boxes next to the issues you want to change.
      2. Adjust above form elements. (It's always a good idea to add some comment explaining what you're doing.)
      3. Click the below \"Commit\" button. *************** *** 1405,1412 **** $movers =~ s/@/\@/g; if ( Param("move-enabled") ! && (defined $::COOKIE{"Bugzilla_login"}) ! && ($::COOKIE{"Bugzilla_login"} =~ /($movers)/) ){ print "

        "; print ""; --- 1405,1412 ---- $movers =~ s/@/\@/g; if ( Param("move-enabled") ! && (defined $::COOKIE{"Issuezilla_login"}) ! && ($::COOKIE{"Issuezilla_login"} =~ /($movers)/) ){ print "

        "; print ""; *************** *** 1418,1444 **** if ($count > 0) { print " ! Query Page    ! Enter New Bug    Change columns"; ! if (!$dotweak && $count > 1 && UserInGroup("editbugs")) { print "  \n"; print ""; ! print "Change several bugs at once\n"; } my @owners = sort(keys(%ownerhash)); ! if (@owners > 1 && UserInGroup("editbugs")) { my $suffix = Param('emailsuffix'); if ($suffix ne "") { map(s/$/$suffix/, @owners); } my $list = join(',', @owners); print qq{  \n}; ! print qq{Send mail to bug owners\n}; } print qq{  \n}; print qq{Edit this query\n}; --- 1418,1444 ---- if ($count > 0) { print " ! Query Page    ! Enter New Issue    Change columns"; ! if (!$dotweak && $count > 1 && UserInGroup("editissues")) { print "  \n"; print ""; ! print "Change several issues at once\n"; } my @owners = sort(keys(%ownerhash)); ! if (@owners > 1 && UserInGroup("editissues")) { my $suffix = Param('emailsuffix'); if ($suffix ne "") { map(s/$/$suffix/, @owners); } my $list = join(',', @owners); print qq{  \n}; ! print qq{Send mail to issue owners\n}; } print qq{  \n}; print qq{Edit this query\n}; Index: bugwritinghelp.html =================================================================== RCS file: /cvsroot/mozilla/webtools/bugzilla/bugwritinghelp.html,v retrieving revision 1.1 diff -c -r1.1 bugwritinghelp.html *** bugwritinghelp.html 2000/03/07 17:59:38 1.1 --- bugwritinghelp.html 2000/09/29 04:57:12 *************** *** 4,15 **** ! Bug Writing Guidelines !

        bug writing guidelines

        (Please send feedback/update requests to Eli Goldberg)

        --- 4,15 ---- ! Issue Writing Guidelines !

        issue writing guidelines

        (Please send feedback/update requests to Eli Goldberg)

        *************** *** 18,54 ****
        !

        Simply put, the more effectively you report a bug, the more likely an engineer will actually fix it.
        !
        !
        These bug writing guidelines are an attempt at a general tutorial on writing ! effective bug reports for novice bug writers; not every sentence may precisely apply to your software project.


        ! How to Write a Useful Bug Report

        !

        Useful bug reports are ones that get bugs fixed. A useful bug report normally has two qualities:

        1. Reproducible. If an engineer can't see it or conclusively prove that it exists, the engineer will probably stamp it "WORKSFORME" or "INVALID", ! and move on to the next bug. Every detail you can provide helps.

        2. Specific. The quicker the engineer can isolate the issue to a specific problem, the more likely it'll be expediently fixed. (If a programmer or tester ! has to decypher a bug, they spend more time cursing the submitter than fixing or testing the problem.)

        Let's say the application you're testing is a web browser. You crash at foo.com, ! and want to write up a bug report:

        BAD: "My browser crashed. I think I was on foo.com. My computer uses --- 18,54 ----

        !

        Simply put, the more effectively you report an issue, the more likely an engineer will actually fix it.
        !
        !
        These issue writing guidelines are an attempt at a general tutorial on writing ! effective issue reports for novice issue writers; not every sentence may precisely apply to your software project.


        ! How to Write a Useful Issue Report

        !

        Useful issue reports are ones that get issues fixed. A useful issue report normally has two qualities:

        1. Reproducible. If an engineer can't see it or conclusively prove that it exists, the engineer will probably stamp it "WORKSFORME" or "INVALID", ! and move on to the next issue. Every detail you can provide helps.

        2. Specific. The quicker the engineer can isolate the issue to a specific problem, the more likely it'll be expediently fixed. (If a programmer or tester ! has to decypher an issue, they spend more time cursing the submitter than fixing or testing the problem.)

        Let's say the application you're testing is a web browser. You crash at foo.com, ! and want to write up an issue report:

        BAD: "My browser crashed. I think I was on foo.com. My computer uses *************** *** 74,101 ****



        ! How to Enter your Useful Bug Report into Bugzilla
        :

        !

        Before you enter your bug, use the Bugzilla Query Page to determine whether the ! defect you've discovered is a known bug, and has already been reported. (If your ! bug is the 37th duplicate of a known issue, you're more likely to annoy the engineer. ! Annoyed engineers fix fewer bugs.)

        ! Next, be sure that you've reproduced your bug using a recent build. (Engineers tend to be most interested in problems afflicting the code base that they're actively ! working on, rather than those in a code base that's hundreds of bug fixes obsolete.)

        ! If you've discovered a new bug using a current build, report it in Bugzilla:

            !
          1. From your Bugzilla main page, choose "Enter a new bug". !
          2. Select the product that you've found a bug in.
          3. Enter your E-mail address, Password, and press the "Login" button. (If you don't yet have a password, leave the password text box empty, and press the "E-mail me a password" button instead. You'll receive an E-mail message --- 74,101 ----



            ! How to Enter your Useful Issue Report into Issuezilla
            :

            !

            Before you enter your issue, use the Issuezilla Query Page to determine whether the ! defect you've discovered is a known issue, and has already been reported. (If your ! issue is the 37th duplicate of a known issue, you're more likely to annoy the engineer. ! Annoyed engineers fix fewer issues.)

            ! Next, be sure that you've reproduced your issue using a recent build. (Engineers tend to be most interested in problems afflicting the code base that they're actively ! working on, rather than those in a code base that's hundreds of issue fixes obsolete.)

            ! If you've discovered a new issue using a current build, report it in Issuezilla:

                !
              1. From your Issuezilla main page, choose "Enter a new issue". !
              2. Select the product that you've found an issue in.
              3. Enter your E-mail address, Password, and press the "Login" button. (If you don't yet have a password, leave the password text box empty, and press the "E-mail me a password" button instead. You'll receive an E-mail message *************** *** 107,184 ****
                !

                Where did you find the bug?

                !

                Product: In which product did you find the bug?
                You just filled this out on the last page.

                !

                Version: In which product version did you find the bug?
                If applicable.

                !

                Component: In which component does the bug exist?
                ! Bugzilla requires that you select a component to enter a bug. (If they all look meaningless, click on the Component link, which links to descriptions of each component, to help you make the best choice.)

                !

                Platform: On which hardware platform did you find this bug? (e.g. Macintosh, SGI, Sun, PC.)
                ! If you know the bug happens on all hardware platforms, choose 'All'. Otherwise, select ! the platform that you found the bug on, or "Other" if your platform isn't listed.

                !

                OS: On which Operating System (OS) did you find this bug? (e.g. Linux, Windows NT, Mac OS 8.5.)
                ! If you know the bug happens on all OSs, choose 'All'. Otherwise, select the OS that ! you found the bug on, or "Other" if your OS isn't listed.


                ! How important is the bug?

                !

                Severity: How damaging is the bug?
                ! This item defaults to 'normal'. (To determine the most appropriate severity for a ! particular bug, click on the Severity link for a full explanation of each choice, ! from Critical to Enhancement.)


                ! Who will be following up on the bug?

                !

                Assigned To: Which engineer should be responsible for fixing this bug?
                ! Bugzilla will automatically assign the bug to a default engineer upon submitting ! a bug report; the text box exists to allow you to manually assign it to a different engineer. (To see the list of default engineers for each component, click on the Component link.)

                !

                Cc: Who else should receive e-mail updates on changes to this bug?
                List the full e-mail addresses of other individuals who should receive an e-mail ! update upon every change to the bug report. You can enter as many e-mail addresses as you'd like; e-mail addresses must be separated by commas, with no spaces between the addresses.


                ! What else can you tell the engineer about the bug?

                !

                URL: On what URL did you discover this bug?
                ! If you encountered the bug on a particular URL, please provide it (or, them) here. ! If you've isolated the bug to a specific HTML snippet, please also provide a URL for that, too.

                !

                Summary: How would you describe the bug, in approximately 60 or fewer characters?
                ! A good summary should quickly and uniquely identify a bug report. Otherwise, ! developers cannot meaningfully query by bug summary, and will often fail to pay attention ! to your bug report when reviewing a 10 page bug list.

                A summary of "PCMCIA install fails on Tosh Tecra 780DVD w/ 3c589C" is a useful title. "Software fails" or "install problem" would be examples of a bad title.


                ! Description: What else can you tell the engineer about this bug?
                Please provide as detailed of a problem diagnosis in this field as possible.

                ! Where applicable, using the following bug report template will help ensure that all relevant information comes through:

                --- 107,185 ----
                !

                Where did you find the issue?

                !

                Product: In which product did you find the issue?
                You just filled this out on the last page.

                !

                Version: In which product version did you find the issue?
                If applicable.

                !

                Component: In which component does the issue exist?
                ! Issuezilla requires that you select a component to enter an issue. (If they all look meaningless, click on the Component link, which links to descriptions of each component, to help you make the best choice.)

                !

                Platform: On which hardware platform did you find this issue? (e.g. Macintosh, SGI, Sun, PC.)
                ! If you know the issue happens on all hardware platforms, choose 'All'. Otherwise, select ! the platform that you found the issue on, or "Other" if your platform isn't listed.

                !

                OS: On which Operating System (OS) did you find this issue? (e.g. Linux, Windows NT, Mac OS 8.5.)
                ! If you know the issue happens on all OSs, choose 'All'. Otherwise, select the OS that ! you found the issue on, or "Other" if your OS isn't listed.


                ! How important is the issue?

                !

                Issue Type: Is this a defect, enhancement, ! feature-request, task or patch?
                This item defaults to ! 'task'. (To determine the most appropriate type of issue, ! click on the Issue Type link for a full explanation of each ! choice.)


                ! Who will be following up on the issue?

                !

                Assigned To: Which engineer should be responsible for fixing this issue?
                ! Issuezilla will automatically assign the issue to a default engineer upon submitting ! an issue report; the text box exists to allow you to manually assign it to a different engineer. (To see the list of default engineers for each component, click on the Component link.)

                !

                Cc: Who else should receive e-mail updates on changes to this issue?
                List the full e-mail addresses of other individuals who should receive an e-mail ! update upon every change to the issue report. You can enter as many e-mail addresses as you'd like; e-mail addresses must be separated by commas, with no spaces between the addresses.


                ! What else can you tell the engineer about the issue?

                !

                URL: On what URL did you discover this issue?
                ! If you encountered the issue on a particular URL, please provide it (or, them) here. ! If you've isolated the issue to a specific HTML snippet, please also provide a URL for that, too.

                !

                Summary: How would you describe the issue, in approximately 60 or fewer characters?
                ! A good summary should quickly and uniquely identify an issue report. Otherwise, ! developers cannot meaningfully query by issue summary, and will often fail to pay attention ! to your issue report when reviewing a 10 page issue list.

                A summary of "PCMCIA install fails on Tosh Tecra 780DVD w/ 3c589C" is a useful title. "Software fails" or "install problem" would be examples of a bad title.


                ! Description: What else can you tell the engineer about this issue?
                Please provide as detailed of a problem diagnosis in this field as possible.

                ! Where applicable, using the following issue report template will help ensure that all relevant information comes through:

                *************** *** 188,194 ****
                Drag-selecting any page crashes Mac builds in NSGetFactory
                !

                Steps to Reproduce: The minimal set of steps necessary to trigger the bug. Include any special setup steps.

                --- 189,195 ----
                Drag-selecting any page crashes Mac builds in NSGetFactory
                !

                Steps to Reproduce: The minimal set of steps necessary to trigger the issue. Include any special setup steps.

                *************** *** 203,212 ****

                Actual Results: What the application did after performing the above steps.

                !
                The application crashed. Stack crawl appended below from MacsBug.
                !

                Expected Results: What the application should have done, were the bug not present.

                --- 204,213 ----

                Actual Results: What the application did after performing the above steps.

                !
                The application crashed. Stack crawl appended below from MacsIssue.
                !

                Expected Results: What the application should have done, were the issue not present.

                *************** *** 215,227 ****

                Build Date & Platform: Date and platform of the build that you first ! encountered the bug in.

                11/2/99 build on Mac OS (Checked Viewer & Apprunner)
                !

                Additional Builds and Platforms: Whether or not the bug takes place on other platforms or browsers.

                --- 216,228 ----

                Build Date & Platform: Date and platform of the build that you first ! encountered the issue in.

                11/2/99 build on Mac OS (Checked Viewer & Apprunner)
                !

                Additional Builds and Platforms: Whether or not the issue takes place on other platforms or browsers.

                *************** *** 235,247 ****
                !

                Additional Information: Any other debugging information. For crashing bugs:

                • Win32: if you receive a Dr. Watson error, please note the type of the crash, and the module that the application crashed in. (e.g. access violation in apprunner.exe) !
                • Mac OS: if you're running MacsBug, please provide the results of a how and an sc.
                • Unix: please provide a minimized stack trace, which can be generated by typing gdb apprunner core into a shell prompt. --- 236,248 ----
                !

                Additional Information: Any other deissueging information. For crashing issues:

                • Win32: if you receive a Dr. Watson error, please note the type of the crash, and the module that the application crashed in. (e.g. access violation in apprunner.exe) !
                • Mac OS: if you're running MacsIssue, please provide the results of a how and an sc.
                • Unix: please provide a minimized stack trace, which can be generated by typing gdb apprunner core into a shell prompt. *************** *** 250,256 ****

                  !

                  *** MACSBUG STACK CRAWL OF CRASH (Mac OS)
                    
                    Calling chain using A6/R1 links
                     Back chain  ISA  Caller
                  --- 251,257 ----
                    
                    			

                  !

                  *** MACSISSUE STACK CRAWL OF CRASH (Mac OS)
                    
                    Calling chain using A6/R1 links
                     Back chain  ISA  Caller
                  ***************
                  *** 267,273 ****
                    	

                  You're done!

                  After double-checking your entries for any possible errors, press the "Commit" ! button, and your bug report will now be in the Bugzilla database.


                  (Thanks to Claudius Gayle, Peter Mock, Chris Pratt, Tom Schutter, --- 268,274 ----

                  You're done!

                  After double-checking your entries for any possible errors, press the "Commit" ! button, and your issue report will now be in the Issuezilla database.


                  (Thanks to Claudius Gayle, Peter Mock, Chris Pratt, Tom Schutter, Index: bugzilla.dtd =================================================================== RCS file: /cvsroot/mozilla/webtools/bugzilla/bugzilla.dtd,v retrieving revision 1.2 diff -c -r1.2 bugzilla.dtd *** bugzilla.dtd 2000/05/26 06:34:45 1.2 --- bugzilla.dtd 2000/09/29 04:57:12 *************** *** 1,17 **** ! ! ! ! ! ! ! ! ! --- 1,17 ---- ! ! ! ! ! ! ! ! ! *************** *** 24,38 **** ! ! ! --- 24,38 ---- ! ! ! Index: changepassword.cgi =================================================================== RCS file: /cvsroot/mozilla/webtools/bugzilla/changepassword.cgi,v retrieving revision 1.19 diff -c -r1.19 changepassword.cgi *** changepassword.cgi 2000/01/25 07:53:29 1.19 --- changepassword.cgi 2000/09/29 04:57:12 *************** *** 1,4 **** ! #!/usr/bonsaitools/bin/perl -w # -*- Mode: perl; indent-tabs-mode: nil -*- # # The contents of this file are subject to the Mozilla Public --- 1,4 ---- ! #!/usr/bin/perl -w # -*- Mode: perl; indent-tabs-mode: nil -*- # # The contents of this file are subject to the Mozilla Public *************** *** 11,17 **** # 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 --- 11,17 ---- # implied. See the License for the specific language governing # rights and limitations under the License. # ! # The Original Code is the Issuezilla Issue Tracking System. # # The Initial Developer of the Original Code is Netscape Communications # Corporation. Portions created by Netscape are Index: checksetup.pl =================================================================== RCS file: /cvsroot/mozilla/webtools/bugzilla/checksetup.pl,v retrieving revision 1.49 diff -c -r1.49 checksetup.pl *** checksetup.pl 2000/09/27 17:51:36 1.49 --- checksetup.pl 2000/09/29 04:57:12 *************** *** 1,4 **** ! #!/usr/bonsaitools/bin/perl -w # -*- Mode: perl; indent-tabs-mode: nil -*- # # The contents of this file are subject to the Mozilla Public --- 1,4 ---- ! #!/usr/bin/perl -w # -*- Mode: perl; indent-tabs-mode: nil -*- # # The contents of this file are subject to the Mozilla Public *************** *** 38,44 **** # It does so by doing things for you as well as testing for problems # early. # ! # And you can re-run it whenever you want. Especially after Bugzilla # gets updated you SHOULD rerun it. Because then it may update your # SQL table definitions so that they are again in sync with the code. # --- 38,44 ---- # It does so by doing things for you as well as testing for problems # early. # ! # And you can re-run it whenever you want. Especially after Issuezilla # gets updated you SHOULD rerun it. Because then it may update your # SQL table definitions so that they are again in sync with the code. # *************** *** 49,57 **** # - create and populate the data directory after installation # - set the proper rights for the *.cgi, *.html ... etc files # - check if the code can access MySQL ! # - creates the database 'bugs' if the database does not exist # - creates the tables inside the database if they don't exist ! # - automatically changes the table definitions of older BugZilla # installations # - populates the groups # - put the first user into all groups so that the system can --- 49,57 ---- # - create and populate the data directory after installation # - set the proper rights for the *.cgi, *.html ... etc files # - check if the code can access MySQL ! # - creates the database 'issues' if the database does not exist # - creates the tables inside the database if they don't exist ! # - automatically changes the table definitions of older IssueZilla # installations # - populates the groups # - put the first user into all groups so that the system can *************** *** 104,110 **** use vars qw( $webservergroup $db_host $db_port $db_name $db_user $db_pass $db_check ! @severities @priorities @opsys @platforms ); --- 104,110 ---- use vars qw( $webservergroup $db_host $db_port $db_name $db_user $db_pass $db_check ! @issue_types @priorities @opsys @platforms ); *************** *** 162,168 **** $charts++ if eval "require GD"; $charts++ if eval "require Chart::Base"; if ($charts != 2) { ! print "If you you want to see graphical bug dependency charts, you may install\n", "the optional libgd and the Perl modules GD-1.19 and Chart::Base-0.99b, e.g. by\n", "running (as root)\n\n", " perl -MCPAN -eshell\n", --- 162,168 ---- $charts++ if eval "require GD"; $charts++ if eval "require Chart::Base"; if ($charts != 2) { ! print "If you you want to see graphical issue dependency charts, you may install\n", "the optional libgd and the Perl modules GD-1.19 and Chart::Base-0.99b, e.g. by\n", "running (as root)\n\n", " perl -MCPAN -eshell\n", *************** *** 187,201 **** # # Why do it this way around? # ! # Assume we will enhance Bugzilla and eventually more local configuration # stuff arises on the horizon. # ! # But the file 'localconfig' is not in the Bugzilla CVS or tarfile. You # know, we never want to overwrite your own version of 'localconfig', so # we can't put it into the CVS/tarfile, can we? # # Now, we need a new variable. We simply add the necessary stuff to checksetup. ! # The user get's the new version of Bugzilla from the CVS, runs checksetup # and checksetup finds out "Oh, there is something new". Then it adds some # default value to the user's local setup and informs the user to check that # to see if that is what the user wants. --- 187,201 ---- # # Why do it this way around? # ! # Assume we will enhance Issuezilla and eventually more local configuration # stuff arises on the horizon. # ! # But the file 'localconfig' is not in the Issuezilla CVS or tarfile. You # know, we never want to overwrite your own version of 'localconfig', so # we can't put it into the CVS/tarfile, can we? # # Now, we need a new variable. We simply add the necessary stuff to checksetup. ! # The user get's the new version of Issuezilla from the CVS, runs checksetup # and checksetup finds out "Oh, there is something new". Then it adds some # default value to the user's local setup and informs the user to check that # to see if that is what the user wants. *************** *** 238,244 **** # set this to "". # If you set this to anything besides "", you will need to run checksetup.pl # as root. ! $webservergroup = "nobody"; '); --- 238,244 ---- # set this to "". # If you set this to anything besides "", you will need to run checksetup.pl # as root. ! $webservergroup = "httpd"; '); *************** *** 249,262 **** # $db_host = "localhost"; # where is the database? $db_port = 3306; # which port to use ! $db_name = "bugs"; # name of the MySQL database ! $db_user = "bugs"; # user to attach to the MySQL database '); LocalVar('$db_pass', ' # # Some people actually use passwords with their MySQL database ... # ! $db_pass = ""; '); --- 249,262 ---- # $db_host = "localhost"; # where is the database? $db_port = 3306; # which port to use ! $db_name = "issues"; # name of the MySQL database ! $db_user = "tigris"; # user to attach to the MySQL database '); LocalVar('$db_pass', ' # # Some people actually use passwords with their MySQL database ... # ! $db_pass = ""; '); *************** *** 270,287 **** '); ! LocalVar('@severities', ' # ! # Which bug and feature-request severities do you want? # ! @severities = ( ! "blocker", ! "critical", ! "major", ! "normal", ! "minor", ! "trivial", ! "enhancement" ); '); --- 270,285 ---- '); ! LocalVar('@issue_types', ' # ! # Which issue_types do you want? # ! @issue_types = ( ! "DEFECT", ! "ENHANCEMENT", ! "FEATURE", ! "TASK", ! "PATCH" ); '); *************** *** 289,295 **** LocalVar('@priorities', ' # ! # Which priorities do you want to assign to bugs and feature-request? # @priorities = ( "P1", --- 287,293 ---- LocalVar('@priorities', ' # ! # Which priorities do you want to assign to issues and feature-request? # @priorities = ( "P1", *************** *** 362,368 **** if ($newstuff ne "") { ! print "\nThis version of Bugzilla contains some variables that you may \n", "to change and adapt to your local settings. Please edit the file\n", "'localconfig' and rerun checksetup.pl\n\n", "The following variables are new to localconfig since you last ran\n", --- 360,366 ---- if ($newstuff ne "") { ! print "\nThis version of Issuezilla contains some variables that you may \n", "to change and adapt to your local settings. Please edit the file\n", "'localconfig' and rerun checksetup.pl\n\n", "The following variables are new to localconfig since you last ran\n", *************** *** 384,397 **** unless (-d 'data') { print "Creating data directory ...\n"; ! mkdir 'data', 0770; if ($webservergroup eq "") { ! chmod 0777, 'data'; } open FILE, '>>data/comments'; close FILE; open FILE, '>>data/nomail'; close FILE; open FILE, '>>data/mail'; close FILE; ! chmod 0666, glob('data/*'); } --- 382,395 ---- unless (-d 'data') { print "Creating data directory ...\n"; ! mkdir 'data', 0700; if ($webservergroup eq "") { ! chmod 0700, 'data'; } open FILE, '>>data/comments'; close FILE; open FILE, '>>data/nomail'; close FILE; open FILE, '>>data/mail'; close FILE; ! chmod 0600, glob('data/*'); } *************** *** 412,418 **** # The rationale is that the web server generally runs as nobody and so the cgi # scripts should not be writable for nobody, otherwise someone may be possible # to change the cgi's when exploiting some security flaw somewhere (not ! # necessarily in Bugzilla!) # # Also, some *.pl files are executable, some are not. # --- 410,416 ---- # The rationale is that the web server generally runs as nobody and so the cgi # scripts should not be writable for nobody, otherwise someone may be possible # to change the cgi's when exploiting some security flaw somewhere (not ! # necessarily in Issuezilla!) # # Also, some *.pl files are executable, some are not. # *************** *** 427,433 **** # Not all directories have permissions changed on them. i.e., changing ./CVS # to be 0640 is bad. # ! # Fixed bug in chmod invokation. chmod (at least on my linux box running perl # 5.005 needs a valid first argument, not 0. # # (end changes, 03/14/00 by SML) --- 425,431 ---- # Not all directories have permissions changed on them. i.e., changing ./CVS # to be 0640 is bad. # ! # Fixed issue in chmod invokation. chmod (at least on my linux box running perl # 5.005 needs a valid first argument, not 0. # # (end changes, 03/14/00 by SML) *************** *** 455,467 **** } if ($webservergroup) { ! mkdir 'shadow', 0770 unless -d 'shadow'; # Funny! getgrname returns the GID if fed with NAME ... my $webservergid = getgrnam($webservergroup); # chmod needs to be called with a valid uid, not 0. $< returns the ! # caller's uid. Maybe there should be a $bugzillauid, and call with that # userid. ! chown $<, $webservergid, glob('*'); my @files = glob('*'); my $file; foreach $file (@files) { --- 453,475 ---- } if ($webservergroup) { ! mkdir 'shadow', 0700 unless -d 'shadow'; # Funny! getgrname returns the GID if fed with NAME ... my $webservergid = getgrnam($webservergroup); # chmod needs to be called with a valid uid, not 0. $< returns the ! # caller's uid. Maybe there should be a $issuezillauid, and call with that # userid. ! ! ## BEGIN NPM fix ! my $webserveruid = getpwnam($webservergroup); ! ##NPM: chown $<, $webservergid, glob('*'); ! chown 0, 0, glob('*'); ! chown $webserveruid, $webservergid, 'data'; ! chown $webserveruid, $webservergid, 'shadow'; ! chown $webserveruid, $webservergid, glob('data/*'); ! chown $webserveruid, $webservergid, glob('data/*/'); ! ## END NPM fix ! my @files = glob('*'); my $file; foreach $file (@files) { *************** *** 469,485 **** if (!(-d $file)) { # check if the file is executable. if (isExecutableFile($file)) { ! chmod 0750, $file; } else { ! chmod 0640, $file; } } } # make sure that contrib keeps the permissions it had (don't touch it) ! chmod 0770, 'data', 'shadow'; ! chmod 0666, glob('data/*'); ! chmod 0777, glob('data/*/'); # directories stay executable } --- 477,493 ---- if (!(-d $file)) { # check if the file is executable. if (isExecutableFile($file)) { ! chmod 0755, $file; } else { ! chmod 0644, $file; } } } # make sure that contrib keeps the permissions it had (don't touch it) ! chmod 0700, 'data', 'shadow'; ! chmod 0600, glob('data/*'); ! chmod 0700, glob('data/*/'); # directories stay executable } *************** *** 516,522 **** * MySQL is not running. * MySQL is running, but the rights are not set correct. Go and read the ! README file of Bugzilla and all parts of the MySQL documentation. * There is an subtle problem with Perl, DBI, DBD::mysql and MySQL. Make sure all settings in 'localconfig' are correct. If all else fails, set '\$db_check' to zero.\n --- 524,530 ---- * MySQL is not running. * MySQL is running, but the rights are not set correct. Go and read the ! README file of Issuezilla and all parts of the MySQL documentation. * There is an subtle problem with Perl, DBI, DBD::mysql and MySQL. Make sure all settings in 'localconfig' are correct. If all else fails, set '\$db_check' to zero.\n *************** *** 529,535 **** my $connectstring = "dbi:$db_base:$db_name:host=$db_host:port=$db_port"; my $dbh = DBI->connect($connectstring, $db_user, $db_pass) or die "Can't connect to the table '$connectstring'.\n", ! "Have you read Bugzilla's README? Have you read the doc of '$db_name'?\n"; END { $dbh->disconnect if $dbh } --- 537,543 ---- my $connectstring = "dbi:$db_base:$db_name:host=$db_host:port=$db_port"; my $dbh = DBI->connect($connectstring, $db_user, $db_pass) or die "Can't connect to the table '$connectstring'.\n", ! "Have you read Issuezilla's README? Have you read the doc of '$db_name'?\n"; END { $dbh->disconnect if $dbh } *************** *** 550,556 **** # If you want intentionally do this, yon can always drop a table and re-run # checksetup, e.g. like this: # ! # $ mysql bugs # mysql> drop table votes; # mysql> exit; # $ ./checksetup.pl --- 558,564 ---- # If you want intentionally do this, yon can always drop a table and re-run # checksetup, e.g. like this: # ! # $ mysql issues # mysql> drop table votes; # mysql> exit; # $ ./checksetup.pl *************** *** 563,584 **** my %table; ! $table{bugs_activity} = ! 'bug_id mediumint not null, who mediumint not null, ! bug_when datetime not null, fieldid mediumint not null, oldvalue tinytext, newvalue tinytext, ! index (bug_id), ! index (bug_when), index (fieldid)'; $table{attachments} = 'attach_id mediumint not null auto_increment primary key, ! bug_id mediumint not null, creation_ts timestamp, description mediumtext not null, mimetype mediumtext not null, --- 571,592 ---- my %table; ! $table{issues_activity} = ! 'issue_id mediumint not null, who mediumint not null, ! issue_when datetime not null, fieldid mediumint not null, oldvalue tinytext, newvalue tinytext, ! index (issue_id), ! index (issue_when), index (fieldid)'; $table{attachments} = 'attach_id mediumint not null auto_increment primary key, ! issue_id mediumint not null, creation_ts timestamp, description mediumtext not null, mimetype mediumtext not null, *************** *** 587,606 **** thedata longblob not null, submitter_id mediumint not null, ! index(bug_id), index(creation_ts)'; # # Apostrophe's are not supportied in the enum types. # See http://bugzilla.mozilla.org/show_bug.cgi?id=27309 # ! $table{bugs} = ! 'bug_id mediumint not null auto_increment primary key, groupset bigint not null, assigned_to mediumint not null, # This is a comment. ! bug_file_loc text, ! bug_severity enum($severities) not null, ! bug_status enum("UNCONFIRMED", "NEW", "ASSIGNED", "REOPENED", "RESOLVED", "VERIFIED", "CLOSED") not null, creation_ts datetime not null, delta_ts timestamp, short_desc mediumtext, --- 595,614 ---- thedata longblob not null, submitter_id mediumint not null, ! index(issue_id), index(creation_ts)'; # # Apostrophe's are not supportied in the enum types. # See http://bugzilla.mozilla.org/show_bug.cgi?id=27309 # ! $table{issues} = ! 'issue_id mediumint not null auto_increment primary key, groupset bigint not null, assigned_to mediumint not null, # This is a comment. ! issue_file_loc text, ! issue_type enum($issue_types) not null, ! issue_status enum("UNCONFIRMED", "NEW", "ASSIGNED", "REOPENED", "RESOLVED", "VERIFIED", "CLOSED") not null, creation_ts datetime not null, delta_ts timestamp, short_desc mediumtext, *************** *** 625,632 **** index (assigned_to), index (creation_ts), index (delta_ts), ! index (bug_severity), ! index (bug_status), index (op_sys), index (priority), index (product), --- 633,640 ---- index (assigned_to), index (creation_ts), index (delta_ts), ! index (issue_type), ! index (issue_status), index (op_sys), index (priority), index (product), *************** *** 640,650 **** $table{cc} = ! 'bug_id mediumint not null, who mediumint not null, index(who), ! unique(bug_id,who)'; $table{watch} = 'watcher mediumint not null, --- 648,658 ---- $table{cc} = ! 'issue_id mediumint not null, who mediumint not null, index(who), ! unique(issue_id,who)'; $table{watch} = 'watcher mediumint not null, *************** *** 655,667 **** $table{longdescs} = ! 'bug_id mediumint not null, who mediumint not null, ! bug_when datetime not null, thetext mediumtext, ! index(bug_id), ! index(bug_when)'; $table{components} = --- 663,675 ---- $table{longdescs} = ! 'issue_id mediumint not null, who mediumint not null, ! issue_when datetime not null, thetext mediumtext, ! index(issue_id), ! index(issue_when)'; $table{components} = *************** *** 683,691 **** # Group bits must be a power of two. Groups are identified by a bit; sets of # groups are indicated by or-ing these values together. # ! # isbuggroup is nonzero if this is a group that controls access to a set ! # of bugs. In otherword, the groupset field in the bugs table should only ! # have this group's bit set if isbuggroup is nonzero. # # User regexp is which email addresses are initially put into this group. # This is only used when an email account is created; otherwise, profiles --- 691,699 ---- # Group bits must be a power of two. Groups are identified by a bit; sets of # groups are indicated by or-ing these values together. # ! # isissuegroup is nonzero if this is a group that controls access to a set ! # of issues. In otherword, the groupset field in the issues table should only ! # have this group's bit set if isissuegroup is nonzero. # # User regexp is which email addresses are initially put into this group. # This is only used when an email account is created; otherwise, profiles *************** *** 695,701 **** 'bit bigint not null, name varchar(255) not null, description text not null, ! isbuggroup tinyint not null, userregexp tinytext not null, unique(bit), --- 703,709 ---- 'bit bigint not null, name varchar(255) not null, description text not null, ! isissuegroup tinyint not null, userregexp tinytext not null, unique(bit), *************** *** 718,724 **** milestoneurl tinytext not null, disallownew tinyint not null, votesperuser smallint not null, ! maxvotesperbug smallint not null default 10000, votestoconfirm smallint not null, defaultmilestone varchar(20) not null default "---" '; --- 726,732 ---- milestoneurl tinytext not null, disallownew tinyint not null, votesperuser smallint not null, ! maxvotesperissue smallint not null default 10000, votestoconfirm smallint not null, defaultmilestone varchar(20) not null default "---" '; *************** *** 734,740 **** emailnotification enum("ExcludeSelfChanges", "CConly", "All") not null default "ExcludeSelfChanges", disabledtext mediumtext not null, newemailtech tinyint not null, ! mybugslink tinyint not null default 1, blessgroupset bigint not null, --- 742,748 ---- emailnotification enum("ExcludeSelfChanges", "CConly", "All") not null default "ExcludeSelfChanges", disabledtext mediumtext not null, newemailtech tinyint not null, ! myissueslink tinyint not null default 1, blessgroupset bigint not null, *************** *** 791,808 **** $table{votes} = 'who mediumint not null, ! bug_id mediumint not null, count smallint not null, index(who), ! index(bug_id)'; $table{keywords} = ! 'bug_id mediumint not null, keywordid smallint not null, index(keywordid), ! unique(bug_id,keywordid)'; $table{keyworddefs} = 'id smallint not null primary key, --- 799,816 ---- $table{votes} = 'who mediumint not null, ! issue_id mediumint not null, count smallint not null, index(who), ! index(issue_id)'; $table{keywords} = ! 'issue_id mediumint not null, keywordid smallint not null, index(keywordid), ! unique(issue_id,keywordid)'; $table{keyworddefs} = 'id smallint not null primary key, *************** *** 840,846 **** # add lines here if you add more --LOCAL-- config vars that end up in the enums: ! my $severities = '"' . join('", "', @severities) . '"'; my $priorities = '"' . join('", "', @priorities) . '"'; my $opsys = '"' . join('", "', @opsys) . '"'; my $platforms = '"' . join('", "', @platforms) . '"'; --- 848,854 ---- # add lines here if you add more --LOCAL-- config vars that end up in the enums: ! my $issue_types = '"' . join('", "', @issue_types) . '"'; my $priorities = '"' . join('", "', @priorities) . '"'; my $opsys = '"' . join('", "', @opsys) . '"'; my $platforms = '"' . join('", "', @platforms) . '"'; *************** *** 853,859 **** # add lines here if you add more --LOCAL-- config vars that end up in # the enums: ! $fielddef =~ s/\$severities/$severities/; $fielddef =~ s/\$priorities/$priorities/; $fielddef =~ s/\$opsys/$opsys/; $fielddef =~ s/\$platforms/$platforms/; --- 861,867 ---- # add lines here if you add more --LOCAL-- config vars that end up in # the enums: ! $fielddef =~ s/\$issue_types/$issue_types/; $fielddef =~ s/\$priorities/$priorities/; $fielddef =~ s/\$opsys/$opsys/; $fielddef =~ s/\$platforms/$platforms/; *************** *** 917,923 **** # ! # BugZilla uses --GROUPS-- to assign various rights to its users. # AddGroup 'tweakparams', 'Can tweak operating parameters'; --- 925,931 ---- # ! # IssueZilla uses --GROUPS-- to assign various rights to its users. # AddGroup 'tweakparams', 'Can tweak operating parameters'; *************** *** 930,942 **** # code that updates the database structure. AddField('profiles', 'groupset', 'bigint not null'); ! if (!GroupExists("editbugs")) { ! my $id = AddGroup('editbugs', 'Can edit all aspects of any bug.', ".*"); $dbh->do("UPDATE profiles SET groupset = groupset | $id"); } if (!GroupExists("canconfirm")) { ! my $id = AddGroup('canconfirm', 'Can confirm a bug.', ".*"); $dbh->do("UPDATE profiles SET groupset = groupset | $id"); } --- 938,950 ---- # code that updates the database structure. AddField('profiles', 'groupset', 'bigint not null'); ! if (!GroupExists("editissues")) { ! my $id = AddGroup('editissues', 'Can edit all aspects of any issue.', ".*"); $dbh->do("UPDATE profiles SET groupset = groupset | $id"); } if (!GroupExists("canconfirm")) { ! my $id = AddGroup('canconfirm', 'Can confirm an issue.', ".*"); $dbh->do("UPDATE profiles SET groupset = groupset | $id"); } *************** *** 955,967 **** $dbh->do('INSERT INTO products(product, description) VALUES ("TestProduct", "This is a test product. This ought to be blown away and ' . 'replaced with real stuff in a finished installation of ' . ! 'bugzilla.")'); $dbh->do('INSERT INTO versions (value, program) VALUES ("other", "TestProduct")'); $dbh->do('INSERT INTO components (value, program, description) VALUES (' . '"TestComponent", "TestProduct", ' . '"This is a test component in the test product database. ' . 'This ought to be blown away and replaced with real stuff in ' . ! 'a finished installation of bugzilla.")'); $dbh->do('INSERT INTO milestones (product, value) VALUES ("TestProduct","---")'); } --- 963,975 ---- $dbh->do('INSERT INTO products(product, description) VALUES ("TestProduct", "This is a test product. This ought to be blown away and ' . 'replaced with real stuff in a finished installation of ' . ! 'issuezilla.")'); $dbh->do('INSERT INTO versions (value, program) VALUES ("other", "TestProduct")'); $dbh->do('INSERT INTO components (value, program, description) VALUES (' . '"TestComponent", "TestProduct", ' . '"This is a test component in the test product database. ' . 'This ought to be blown away and replaced with real stuff in ' . ! 'a finished installation of issuezilla.")'); $dbh->do('INSERT INTO milestones (product, value) VALUES ("TestProduct","---")'); } *************** *** 996,1013 **** } ! AddFDef("bug_id", "Bug \#", 1); AddFDef("short_desc", "Summary", 1); AddFDef("product", "Product", 1); AddFDef("version", "Version", 1); AddFDef("rep_platform", "Platform", 1); ! AddFDef("bug_file_loc", "URL", 1); AddFDef("op_sys", "OS/Version", 1); ! AddFDef("bug_status", "Status", 1); AddFDef("status_whiteboard", "Status Whiteboard", 1); AddFDef("keywords", "Keywords", 1); AddFDef("resolution", "Resolution", 1); ! AddFDef("bug_severity", "Severity", 1); AddFDef("priority", "Priority", 1); AddFDef("component", "Component", 1); AddFDef("assigned_to", "AssignedTo", 1); --- 1004,1021 ---- } ! AddFDef("issue_id", "Issue \#", 1); AddFDef("short_desc", "Summary", 1); AddFDef("product", "Product", 1); AddFDef("version", "Version", 1); AddFDef("rep_platform", "Platform", 1); ! AddFDef("issue_file_loc", "URL", 1); AddFDef("op_sys", "OS/Version", 1); ! AddFDef("issue_status", "Status", 1); AddFDef("status_whiteboard", "Status Whiteboard", 1); AddFDef("keywords", "Keywords", 1); AddFDef("resolution", "Resolution", 1); ! AddFDef("issue_type", "Issue type", 1); AddFDef("priority", "Priority", 1); AddFDef("component", "Component", 1); AddFDef("assigned_to", "AssignedTo", 1); *************** *** 1015,1029 **** AddFDef("votes", "Votes", 0); AddFDef("qa_contact", "QAContact", 0); AddFDef("cc", "CC", 0); ! AddFDef("dependson", "BugsThisDependsOn", 0); ! AddFDef("blocked", "OtherBugsDependingOnThis", 0); AddFDef("attachments.description", "Attachment description", 0); AddFDef("attachments.thedata", "Attachment data", 0); AddFDef("attachments.mimetype", "Attachment mime type", 0); AddFDef("attachments.ispatch", "Attachment is patch", 0); AddFDef("target_milestone", "Target Milestone", 0); AddFDef("delta_ts", "Last changed date", 0); ! AddFDef("(to_days(now()) - to_days(bugs.delta_ts))", "Days since bug changed", 0); AddFDef("longdesc", "Comment", 0); --- 1023,1037 ---- AddFDef("votes", "Votes", 0); AddFDef("qa_contact", "QAContact", 0); AddFDef("cc", "CC", 0); ! AddFDef("dependson", "IssuesThisDependsOn", 0); ! AddFDef("blocked", "OtherIssuesDependingOnThis", 0); AddFDef("attachments.description", "Attachment description", 0); AddFDef("attachments.thedata", "Attachment data", 0); AddFDef("attachments.mimetype", "Attachment mime type", 0); AddFDef("attachments.ispatch", "Attachment is patch", 0); AddFDef("target_milestone", "Target Milestone", 0); AddFDef("delta_ts", "Last changed date", 0); ! AddFDef("(to_days(now()) - to_days(issues.delta_ts))", "Days since issue changed", 0); AddFDef("longdesc", "Comment", 0); *************** *** 1102,1108 **** } # ! # Check if the enums in the bugs table return the same values that are defined # in the various locally changeable variables. If this is true, then alter the # table definition. # --- 1110,1116 ---- } # ! # Check if the enums in the issues table return the same values that are defined # in the various locally changeable variables. If this is true, then alter the # table definition. # *************** *** 1130,1146 **** # # This code changes the enum types of some SQL tables whenever you change # some --LOCAL-- variables. Once you have a running system, to add new ! # severities, priorities, operating systems and platforms, add them to # the localconfig file and then re-run checksetup.pl which will make the # necessary changes to your database. Additions to these fields in ! # checksetup.pl after the initial installation of bugzilla on a system # are ignored. # ! CheckEnumField('bugs', 'bug_severity', @severities); ! CheckEnumField('bugs', 'priority', @priorities); ! CheckEnumField('bugs', 'op_sys', @opsys); ! CheckEnumField('bugs', 'rep_platform', @platforms); --- 1138,1154 ---- # # This code changes the enum types of some SQL tables whenever you change # some --LOCAL-- variables. Once you have a running system, to add new ! # issue_types, priorities, operating systems and platforms, add them to # the localconfig file and then re-run checksetup.pl which will make the # necessary changes to your database. Additions to these fields in ! # checksetup.pl after the initial installation of issuezilla on a system # are ignored. # ! CheckEnumField('issues', 'issue_type', @issue_types); ! CheckEnumField('issues', 'priority', @priorities); ! CheckEnumField('issues', 'op_sys', @opsys); ! CheckEnumField('issues', 'rep_platform', @platforms); *************** *** 1152,1158 **** # # Assume you just logged in. Now how can you administrate the system? Just ! # execute checksetup.pl again. If there is only 1 user in bugzilla, then # this user is promoted into every group. # --- 1160,1166 ---- # # Assume you just logged in. Now how can you administrate the system? Just ! # execute checksetup.pl again. If there is only 1 user in issuezilla, then # this user is promoted into every group. # *************** *** 1252,1261 **** # really old fields that were added before checksetup.pl existed # but aren't in very old bugzilla's (like 2.1) # Steve Stock (sstock@iconnect-inc.com) ! AddField('bugs', 'target_milestone', 'varchar(20) not null default "---"'); ! AddField('bugs', 'groupset', 'bigint not null'); ! AddField('bugs', 'qa_contact', 'mediumint not null'); ! AddField('bugs', 'status_whiteboard', 'mediumtext not null'); AddField('products', 'disallownew', 'tinyint not null'); AddField('products', 'milestoneurl', 'tinytext not null'); AddField('components', 'initialqacontact', 'tinytext not null'); --- 1260,1269 ---- # really old fields that were added before checksetup.pl existed # but aren't in very old bugzilla's (like 2.1) # Steve Stock (sstock@iconnect-inc.com) ! AddField('issues', 'target_milestone', 'varchar(20) not null default "---"'); ! AddField('issues', 'groupset', 'bigint not null'); ! AddField('issues', 'qa_contact', 'mediumint not null'); ! AddField('issues', 'status_whiteboard', 'mediumtext not null'); AddField('products', 'disallownew', 'tinyint not null'); AddField('products', 'milestoneurl', 'tinytext not null'); AddField('components', 'initialqacontact', 'tinytext not null'); *************** *** 1289,1318 **** # 1999-9-15 Apparently, newer alphas of MySQL won't allow you to have "when" ! # as a column name. So, I have had to rename a column in the bugs_activity # table. ! RenameField ('bugs_activity', 'when', 'bug_when'); ! # 1999-10-11 Restructured voting database to add a cached value in each bug ! # recording how many total votes that bug has. While I'm at it, I removed ! # the unused "area" field from the bugs database. It is distressing to ! # realize that the bugs table has reached the maximum number of indices # allowed by MySQL (16), which may make future enhancements awkward. # (P.S. All is not lost; it appears that the latest betas of MySQL support # a new table format which will allow 32 indices.) ! DropField('bugs', 'area'); ! AddField('bugs', 'votes', 'mediumint not null, add index (votes)'); AddField('products', 'votesperuser', 'mediumint not null'); # The product name used to be very different in various tables. # ! # It was varchar(16) in bugs # tinytext in components # tinytext in products # tinytext in versions --- 1297,1326 ---- # 1999-9-15 Apparently, newer alphas of MySQL won't allow you to have "when" ! # as a column name. So, I have had to rename a column in the issues_activity # table. ! RenameField ('issues_activity', 'when', 'issue_when'); ! # 1999-10-11 Restructured voting database to add a cached value in each issue ! # recording how many total votes that issue has. While I'm at it, I removed ! # the unused "area" field from the issues database. It is distressing to ! # realize that the issues table has reached the maximum number of indices # allowed by MySQL (16), which may make future enhancements awkward. # (P.S. All is not lost; it appears that the latest betas of MySQL support # a new table format which will allow 32 indices.) ! DropField('issues', 'area'); ! AddField('issues', 'votes', 'mediumint not null, add index (votes)'); AddField('products', 'votesperuser', 'mediumint not null'); # The product name used to be very different in various tables. # ! # It was varchar(16) in issues # tinytext in components # tinytext in products # tinytext in versions *************** *** 1320,1363 **** # tinytext is equivalent to varchar(255), which is quite huge, so I change # them all to varchar(64). ! ChangeFieldType ('bugs', 'product', 'varchar(64)'); ChangeFieldType ('components', 'program', 'varchar(64)'); ChangeFieldType ('products', 'product', 'varchar(64)'); ChangeFieldType ('versions', 'program', 'varchar(64)'); ! # 2000-01-16 Added a "keywords" field to the bugs table, which # contains a string copy of the entries of the keywords table for this ! # bug. This is so that I can easily sort and display a keywords ! # column in bug lists. ! if (!GetFieldDef('bugs', 'keywords')) { ! AddField('bugs', 'keywords', 'mediumtext not null'); my @kwords; ! print "Making sure 'keywords' field of table 'bugs' is empty ...\n"; ! $dbh->do("UPDATE bugs SET delta_ts = delta_ts, keywords = '' " . "WHERE keywords != ''"); ! print "Repopulating 'keywords' field of table 'bugs' ...\n"; ! my $sth = $dbh->prepare("SELECT keywords.bug_id, keyworddefs.name " . "FROM keywords, keyworddefs " . "WHERE keyworddefs.id = keywords.keywordid " . ! "ORDER BY keywords.bug_id, keyworddefs.name"); $sth->execute; my @list; ! my $bugid = 0; my @row; while (1) { my ($b, $k) = ($sth->fetchrow_array()); ! if (!defined $b || $b ne $bugid) { if (@list) { ! $dbh->do("UPDATE bugs SET delta_ts = delta_ts, keywords = " . $dbh->quote(join(', ', @list)) . ! " WHERE bug_id = $bugid"); } if (!$b) { last; } ! $bugid = $b; @list = (); } push(@list, $k); --- 1328,1371 ---- # tinytext is equivalent to varchar(255), which is quite huge, so I change # them all to varchar(64). ! ChangeFieldType ('issues', 'product', 'varchar(64)'); ChangeFieldType ('components', 'program', 'varchar(64)'); ChangeFieldType ('products', 'product', 'varchar(64)'); ChangeFieldType ('versions', 'program', 'varchar(64)'); ! # 2000-01-16 Added a "keywords" field to the issues table, which # contains a string copy of the entries of the keywords table for this ! # issue. This is so that I can easily sort and display a keywords ! # column in issue lists. ! if (!GetFieldDef('issues', 'keywords')) { ! AddField('issues', 'keywords', 'mediumtext not null'); my @kwords; ! print "Making sure 'keywords' field of table 'issues' is empty ...\n"; ! $dbh->do("UPDATE issues SET delta_ts = delta_ts, keywords = '' " . "WHERE keywords != ''"); ! print "Repopulating 'keywords' field of table 'issues' ...\n"; ! my $sth = $dbh->prepare("SELECT keywords.issue_id, keyworddefs.name " . "FROM keywords, keyworddefs " . "WHERE keyworddefs.id = keywords.keywordid " . ! "ORDER BY keywords.issue_id, keyworddefs.name"); $sth->execute; my @list; ! my $issueid = 0; my @row; while (1) { my ($b, $k) = ($sth->fetchrow_array()); ! if (!defined $b || $b ne $issueid) { if (@list) { ! $dbh->do("UPDATE issues SET delta_ts = delta_ts, keywords = " . $dbh->quote(join(', ', @list)) . ! " WHERE issue_id = $issueid"); } if (!$b) { last; } ! $issueid = $b; @list = (); } push(@list, $k); *************** *** 1374,1380 **** # 2000-01-20 Added a new "longdescs" table, which is supposed to have all the ! # long descriptions in it, replacing the old long_desc field in the bugs # table. The below hideous code populates this new table with things from # the old field, with ugly parsing and heuristics. --- 1382,1388 ---- # 2000-01-20 Added a new "longdescs" table, which is supposed to have all the ! # long descriptions in it, replacing the old long_desc field in the issues # table. The below hideous code populates this new table with things from # the old field, with ugly parsing and heuristics. *************** *** 1384,1412 **** if ($buffer eq '') { return; } ! $dbh->do("INSERT INTO longdescs (bug_id, who, bug_when, thetext) VALUES " . "($id, $who, " . time2str("'%Y/%m/%d %H:%M:%S'", $when) . ", " . $dbh->quote($buffer) . ")"); } ! if (GetFieldDef('bugs', 'long_desc')) { eval("use Date::Parse"); eval("use Date::Format"); ! my $sth = $dbh->prepare("SELECT count(*) FROM bugs"); $sth->execute(); my ($total) = ($sth->fetchrow_array); print "Populating new long_desc table. This is slow. There are $total\n"; ! print "bugs to process; a line of dots will be printed for each 50.\n\n"; $| = 1; ! $dbh->do("LOCK TABLES bugs write, longdescs write, profiles write"); $dbh->do('DELETE FROM longdescs'); ! $sth = $dbh->prepare("SELECT bug_id, creation_ts, reporter, long_desc " . ! "FROM bugs ORDER BY bug_id"); $sth->execute(); my $count = 0; while (1) { --- 1392,1420 ---- if ($buffer eq '') { return; } ! $dbh->do("INSERT INTO longdescs (issue_id, who, issue_when, thetext) VALUES " . "($id, $who, " . time2str("'%Y/%m/%d %H:%M:%S'", $when) . ", " . $dbh->quote($buffer) . ")"); } ! if (GetFieldDef('issues', 'long_desc')) { eval("use Date::Parse"); eval("use Date::Format"); ! my $sth = $dbh->prepare("SELECT count(*) FROM issues"); $sth->execute(); my ($total) = ($sth->fetchrow_array); print "Populating new long_desc table. This is slow. There are $total\n"; ! print "issues to process; a line of dots will be printed for each 50.\n\n"; $| = 1; ! $dbh->do("LOCK TABLES issues write, longdescs write, profiles write"); $dbh->do('DELETE FROM longdescs'); ! $sth = $dbh->prepare("SELECT issue_id, creation_ts, reporter, long_desc " . ! "FROM issues ORDER BY issue_id"); $sth->execute(); my $count = 0; while (1) { *************** *** 1435,1443 **** # accurate to the second. But we the long # text only contains things accurate to the # minute. And so, if someone makes a comment ! # within a minute of the original bug creation, # then the comment can come *before* the ! # bug creation. So, we add 59 seconds to # the time of all comments, so that they # are always considered to have happened at # the *end* of the given minute, not the --- 1443,1451 ---- # accurate to the second. But we the long # text only contains things accurate to the # minute. And so, if someone makes a comment ! # within a minute of the original issue creation, # then the comment can come *before* the ! # issue creation. So, we add 59 seconds to # the time of all comments, so that they # are always considered to have happened at # the *end* of the given minute, not the *************** *** 1455,1461 **** # This username doesn't exist. Try a special # netscape-only hack (sorry about that, but I don't # think it will hurt any other installations). We ! # have many entries in the bugsystem from an ancient # world where the "@netscape.com" part of the loginname # was omitted. So, look up the user again with that # appended, and use it if it's there. --- 1463,1469 ---- # This username doesn't exist. Try a special # netscape-only hack (sorry about that, but I don't # think it will hurt any other installations). We ! # have many entries in the issuesystem from an ancient # world where the "@netscape.com" part of the loginname # was omitted. So, look up the user again with that # appended, and use it if it's there. *************** *** 1486,1492 **** } next; } else { ! # print "\nDecided this line of bug $id has a date of " . # time2str("'%Y/%m/%d %H:%M:%S'", $date) . # "\nwhich is less than previous line:\n$line\n\n"; } --- 1494,1500 ---- } next; } else { ! # print "\nDecided this line of issue $id has a date of " . # time2str("'%Y/%m/%d %H:%M:%S'", $date) . # "\nwhich is less than previous line:\n$line\n\n"; } *************** *** 1500,1506 **** print "\n\n"; ! DropField('bugs', 'long_desc'); $dbh->do("UNLOCK TABLES"); $::regenerateshadow = 1; --- 1508,1514 ---- print "\n\n"; ! DropField('issues', 'long_desc'); $dbh->do("UNLOCK TABLES"); $::regenerateshadow = 1; *************** *** 1509,1525 **** # 2000-01-18 Added a new table fielddefs that records information about the ! # different fields we keep an activity log on. The bugs_activity table # now has a pointer into that table instead of recording the name directly. ! if (GetFieldDef('bugs_activity', 'field')) { ! AddField('bugs_activity', 'fieldid', 'mediumint not null, ADD INDEX (fieldid)'); print "Populating new fieldid field ...\n"; ! $dbh->do("LOCK TABLES bugs_activity WRITE, fielddefs WRITE"); ! my $sth = $dbh->prepare('SELECT DISTINCT field FROM bugs_activity'); $sth->execute(); my %ids; while (my ($f) = ($sth->fetchrow_array())) { --- 1517,1533 ---- # 2000-01-18 Added a new table fielddefs that records information about the ! # different fields we keep an activity log on. The issues_activity table # now has a pointer into that table instead of recording the name directly. ! if (GetFieldDef('issues_activity', 'field')) { ! AddField('issues_activity', 'fieldid', 'mediumint not null, ADD INDEX (fieldid)'); print "Populating new fieldid field ...\n"; ! $dbh->do("LOCK TABLES issues_activity WRITE, fielddefs WRITE"); ! my $sth = $dbh->prepare('SELECT DISTINCT field FROM issues_activity'); $sth->execute(); my %ids; while (my ($f) = ($sth->fetchrow_array())) { *************** *** 1535,1556 **** $s2->execute(); ($id) = ($s2->fetchrow_array()); } ! $dbh->do("UPDATE bugs_activity SET fieldid = $id WHERE field = $q"); } $dbh->do("UNLOCK TABLES"); ! DropField('bugs_activity', 'field'); } ! # 2000-01-18 New email-notification scheme uses a new field in the bug to ! # record when email notifications were last sent about this bug. Also, # added a user pref whether a user wants to use the brand new experimental # stuff. ! if (!GetFieldDef('bugs', 'lastdiffed')) { ! AddField('bugs', 'lastdiffed', 'datetime not null'); ! $dbh->do('UPDATE bugs SET lastdiffed = now(), delta_ts = delta_ts'); } AddField('profiles', 'newemailtech', 'tinyint not null'); --- 1543,1564 ---- $s2->execute(); ($id) = ($s2->fetchrow_array()); } ! $dbh->do("UPDATE issues_activity SET fieldid = $id WHERE field = $q"); } $dbh->do("UNLOCK TABLES"); ! DropField('issues_activity', 'field'); } ! # 2000-01-18 New email-notification scheme uses a new field in the issue to ! # record when email notifications were last sent about this issue. Also, # added a user pref whether a user wants to use the brand new experimental # stuff. ! if (!GetFieldDef('issues', 'lastdiffed')) { ! AddField('issues', 'lastdiffed', 'datetime not null'); ! $dbh->do('UPDATE issues SET lastdiffed = now(), delta_ts = delta_ts'); } AddField('profiles', 'newemailtech', 'tinyint not null'); *************** *** 1579,1596 **** last; } print "Both $u1 & $u2 are ids for $n! Merging $u2 into $u1 ...\n"; ! foreach my $i (["bugs", "reporter"], ! ["bugs", "assigned_to"], ! ["bugs", "qa_contact"], ["attachments", "submitter_id"], ! ["bugs_activity", "who"], ["cc", "who"], ["votes", "who"], ["longdescs", "who"]) { my ($table, $field) = (@$i); print " Updating $table.$field ...\n"; my $extra = ""; ! if ($table eq "bugs") { $extra = ", delta_ts = delta_ts"; } $dbh->do("UPDATE $table SET $field = $u1 $extra " . --- 1587,1604 ---- last; } print "Both $u1 & $u2 are ids for $n! Merging $u2 into $u1 ...\n"; ! foreach my $i (["issues", "reporter"], ! ["issues", "assigned_to"], ! ["issues", "qa_contact"], ["attachments", "submitter_id"], ! ["issues_activity", "who"], ["cc", "who"], ["votes", "who"], ["longdescs", "who"]) { my ($table, $field) = (@$i); print " Updating $table.$field ...\n"; my $extra = ""; ! if ($table eq "issues") { $extra = ", delta_ts = delta_ts"; } $dbh->do("UPDATE $table SET $field = $u1 $extra " . *************** *** 1607,1638 **** # 2000-01-24 Added a new field to let people control whether the "My ! # bugs" link appears at the bottom of each page. Also can control # whether each named query should show up there. ! AddField('profiles', 'mybugslink', 'tinyint not null default 1'); AddField('namedqueries', 'linkinfooter', 'tinyint not null'); ! # 2000-02-12 Added a new state to bugs, UNCONFIRMED. Added ability to confirm ! # a vote via bugs. Added user bits to control which users can confirm bugs ! # by themselves, and which users can edit bugs without their names on them. # Added a user field which controls which groups a user can put other users # into. my @resolutions = ("", "FIXED", "INVALID", "WONTFIX", "LATER", "REMIND", "DUPLICATE", "WORKSFORME", "MOVED"); ! CheckEnumField('bugs', 'resolution', @resolutions); my @states = ("UNCONFIRMED", "NEW", "ASSIGNED", "REOPENED", "RESOLVED", "VERIFIED", "CLOSED"); ! CheckEnumField('bugs', 'bug_status', @states); ! if (!GetFieldDef('bugs', 'everconfirmed')) { ! AddField('bugs', 'everconfirmed', 'tinyint not null'); ! $dbh->do("UPDATE bugs SET everconfirmed = 1, delta_ts = delta_ts"); } ! AddField('products', 'maxvotesperbug', 'smallint not null default 10000'); AddField('products', 'votestoconfirm', 'smallint not null'); AddField('profiles', 'blessgroupset', 'bigint not null'); --- 1615,1646 ---- # 2000-01-24 Added a new field to let people control whether the "My ! # issues" link appears at the bottom of each page. Also can control # whether each named query should show up there. ! AddField('profiles', 'myissueslink', 'tinyint not null default 1'); AddField('namedqueries', 'linkinfooter', 'tinyint not null'); ! # 2000-02-12 Added a new state to issues, UNCONFIRMED. Added ability to confirm ! # a vote via issues. Added user bits to control which users can confirm issues ! # by themselves, and which users can edit issues without their names on them. # Added a user field which controls which groups a user can put other users # into. my @resolutions = ("", "FIXED", "INVALID", "WONTFIX", "LATER", "REMIND", "DUPLICATE", "WORKSFORME", "MOVED"); ! CheckEnumField('issues', 'resolution', @resolutions); my @states = ("UNCONFIRMED", "NEW", "ASSIGNED", "REOPENED", "RESOLVED", "VERIFIED", "CLOSED"); ! CheckEnumField('issues', 'issue_status', @states); ! if (!GetFieldDef('issues', 'everconfirmed')) { ! AddField('issues', 'everconfirmed', 'tinyint not null'); ! $dbh->do("UPDATE issues SET everconfirmed = 1, delta_ts = delta_ts"); } ! AddField('products', 'maxvotesperissue', 'smallint not null default 10000'); AddField('products', 'votestoconfirm', 'smallint not null'); AddField('profiles', 'blessgroupset', 'bigint not null'); *************** *** 1643,1652 **** $sth->execute(); if (!($sth->fetchrow_arrayref()->[0])) { print "Replacing blank milestones...\n"; ! $dbh->do("UPDATE bugs SET target_milestone = '---', delta_ts=delta_ts WHERE target_milestone = ' '"); # Populate milestone table with all exisiting values in database ! $sth = $dbh->prepare("SELECT DISTINCT target_milestone, product FROM bugs"); $sth->execute(); print "Populating milestones table...\n"; --- 1651,1660 ---- $sth->execute(); if (!($sth->fetchrow_arrayref()->[0])) { print "Replacing blank milestones...\n"; ! $dbh->do("UPDATE issues SET target_milestone = '---', delta_ts=delta_ts WHERE target_milestone = ' '"); # Populate milestone table with all exisiting values in database ! $sth = $dbh->prepare("SELECT DISTINCT target_milestone, product FROM issues"); $sth->execute(); print "Populating milestones table...\n"; *************** *** 1677,1691 **** # 2000-03-22 Changed the default value for target_milestone to be "---" # (which is still not quite correct, but much better than what it was # doing), and made the size of the value field in the milestones table match ! # the size of the target_milestone field in the bugs table. ! ChangeFieldType('bugs', 'target_milestone', 'varchar(20) default "---"'); ChangeFieldType('milestones', 'value', 'varchar(20)'); # 2000-03-23 Added a defaultmilestone field to the products table, so that ! # we know which milestone to initially assign bugs to. if (!GetFieldDef('products', 'defaultmilestone')) { AddField('products', 'defaultmilestone', --- 1685,1699 ---- # 2000-03-22 Changed the default value for target_milestone to be "---" # (which is still not quite correct, but much better than what it was # doing), and made the size of the value field in the milestones table match ! # the size of the target_milestone field in the issues table. ! ChangeFieldType('issues', 'target_milestone', 'varchar(20) default "---"'); ChangeFieldType('milestones', 'value', 'varchar(20)'); # 2000-03-23 Added a defaultmilestone field to the products table, so that ! # we know which milestone to initially assign issues to. if (!GetFieldDef('products', 'defaultmilestone')) { AddField('products', 'defaultmilestone', *************** *** 1716,1722 **** # print "Recreating indexes on cc table.\n"; DropIndexes('cc'); ! $dbh->do("ALTER TABLE cc ADD UNIQUE (bug_id,who)"); $dbh->do("ALTER TABLE cc ADD INDEX (who)"); $::regenerateshadow=1; # cc fields no longer have spaces in them --- 1724,1730 ---- # print "Recreating indexes on cc table.\n"; DropIndexes('cc'); ! $dbh->do("ALTER TABLE cc ADD UNIQUE (issue_id,who)"); $dbh->do("ALTER TABLE cc ADD INDEX (who)"); $::regenerateshadow=1; # cc fields no longer have spaces in them *************** *** 1729,1735 **** print "Recreating indexes on keywords table.\n"; DropIndexes('keywords'); $dbh->do("ALTER TABLE keywords ADD INDEX (keywordid)"); ! $dbh->do("ALTER TABLE keywords ADD UNIQUE (bug_id,keywordid)"); } --- 1737,1743 ---- print "Recreating indexes on keywords table.\n"; DropIndexes('keywords'); $dbh->do("ALTER TABLE keywords ADD INDEX (keywordid)"); ! $dbh->do("ALTER TABLE keywords ADD UNIQUE (issue_id,keywordid)"); } *************** *** 1741,1755 **** # of --TABLE-- and add your field to into the table hash. This new setting # would be honored for every new installation. Then add your # AddField/DropField/ChangeFieldType/RenameField code above. This would then ! # be honored by everyone who updates his Bugzilla installation. # # # Final checks... if ($::regenerateshadow) { ! print "Now regenerating the shadow database for all bugs.\n"; system("./processmail", "regenerate"); } unlink "data/versioncache"; ! print "Reminder: Bugzilla now requires version 3.22.5 or later of MySQL.\n"; ! print "Reminder: Bugzilla now requires version 8.7 or later of sendmail.\n"; --- 1749,1763 ---- # of --TABLE-- and add your field to into the table hash. This new setting # would be honored for every new installation. Then add your # AddField/DropField/ChangeFieldType/RenameField code above. This would then ! # be honored by everyone who updates his Issuezilla installation. # # # Final checks... if ($::regenerateshadow) { ! print "Now regenerating the shadow database for all issues.\n"; system("./processmail", "regenerate"); } unlink "data/versioncache"; ! print "Reminder: Issuezilla now requires version 3.22.5 or later of MySQL.\n"; ! print "Reminder: Issuezilla now requires version 8.7 or later of sendmail.\n"; Index: colchange.cgi =================================================================== RCS file: /cvsroot/mozilla/webtools/bugzilla/colchange.cgi,v retrieving revision 1.16 diff -c -r1.16 colchange.cgi *** colchange.cgi 2000/08/31 18:19:46 1.16 --- colchange.cgi 2000/09/29 04:57:12 *************** *** 1,4 **** ! #!/usr/bonsaitools/bin/perl -w # -*- Mode: perl; indent-tabs-mode: nil -*- # # The contents of this file are subject to the Mozilla Public --- 1,4 ---- ! #!/usr/bin/perl -w # -*- Mode: perl; indent-tabs-mode: nil -*- # # The contents of this file are subject to the Mozilla Public *************** *** 11,17 **** # 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 --- 11,17 ---- # implied. See the License for the specific language governing # rights and limitations under the License. # ! # The Original Code is the Issuezilla Issue Tracking System. # # The Initial Developer of the Original Code is Netscape Communications # Corporation. Portions created by Netscape are *************** *** 33,39 **** ConnectToDatabase(); GetVersionTable(); ! my @masterlist = ("opendate", "changeddate", "severity", "priority", "platform", "owner", "reporter", "status", "resolution", "component", "product", "version", "os", "votes"); --- 33,39 ---- ConnectToDatabase(); GetVersionTable(); ! my @masterlist = ("opendate", "changeddate", "issue_type", "priority", "platform", "owner", "reporter", "status", "resolution", "component", "product", "version", "os", "votes"); *************** *** 132,137 **** print "\n"; print "\n"; print "\n"; ! print "\n"; print "\n"; PutFooter(); --- 132,137 ---- print "

                  \n"; print "\n"; print "\n"; ! print "\n"; print "\n"; PutFooter(); Index: collectstats.pl =================================================================== RCS file: /cvsroot/mozilla/webtools/bugzilla/collectstats.pl,v retrieving revision 1.9 diff -c -r1.9 collectstats.pl *** collectstats.pl 2000/09/12 21:35:46 1.9 --- collectstats.pl 2000/09/29 04:57:12 *************** *** 1,4 **** ! #!/usr/bonsaitools/bin/perl -w # -*- Mode: perl; indent-tabs-mode: nil -*- # # The contents of this file are subject to the Mozilla Public --- 1,4 ---- ! #!/usr/bin/perl -w # -*- Mode: perl; indent-tabs-mode: nil -*- # # The contents of this file are subject to the Mozilla Public *************** *** 11,17 **** # 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 --- 11,17 ---- # implied. See the License for the specific language governing # rights and limitations under the License. # ! # The Original Code is the Issuezilla Issue Tracking System. # # The Initial Developer of the Original Code is Netscape Communications # Corporation. Portions created by Netscape are *************** *** 21,32 **** # Contributor(s): Terry Weissman , # Harrison Page ! # Run me out of cron at midnight to collect Bugzilla statistics. use diagnostics; use strict; use vars @::legal_product, ! @::legal_bug_status; require "globals.pl"; --- 21,32 ---- # Contributor(s): Terry Weissman , # Harrison Page ! # Run me out of cron at midnight to collect Issuezilla statistics. use diagnostics; use strict; use vars @::legal_product, ! @::legal_issue_status; require "globals.pl"; *************** *** 47,54 **** my $dir = shift; if (! -d) { ! mkdir $dir, 0777; ! chmod 0777, $dir; } } --- 47,54 ---- my $dir = shift; if (! -d) { ! mkdir $dir, 0700; ! chmod 0700, $dir; } } *************** *** 67,77 **** if (open DATA, ">>$file") { push my @row, &today; ! foreach my $status (@::legal_bug_status) { if( $product eq "-All-" ) { ! SendSQL("select count(bug_status) from bugs where bug_status='$status'"); } else { ! SendSQL("select count(bug_status) from bugs where bug_status='$status' and product='$product'"); } push @row, FetchOneColumn(); } --- 67,77 ---- if (open DATA, ">>$file") { push my @row, &today; ! foreach my $status (@::legal_issue_status) { if( $product eq "-All-" ) { ! SendSQL("select count(issue_status) from issues where issue_status='$status'"); } else { ! SendSQL("select count(issue_status) from issues where issue_status='$status' and product='$product'"); } push @row, FetchOneColumn(); } *************** *** 79,85 **** if (! $exists) { print DATA <

                  Understanding the UNCONFIRMED state, and other recent changes

                  ! [This document is aimed primarily at people who have used Bugzilla before the UNCONFIRMED state was implemented. It might be helpful for newer users as well.]

                  ! New bugs in some products will now show up in a new state, UNCONFIRMED. This means that we have nobody has confirmed that the ! bug is real. Very busy engineers will probably generally ignore UNCONFIRMED that have been assigned to them, until they have been confirmed in one way or another. (Engineers with more time will ! hopefully glance over their UNCONFIRMED bugs regularly.)

                  ! The page describing bug fields has been updated to include UNCONFIRMED.

                  ! There are two basic ways that a bug can become confirmed (and enter the NEW) state.

                  • A user with the appropriate permissions (see below for more on ! permissions) decides that the bug is a valid one, and confirms it. We hope to gather a small army of responsible volunteers ! to regularly go through bugs for us. !
                  • The bug gathers a certain number of votes. Any valid Bugzilla user may vote for ! bugs (each user gets a certain number of bugs); any UNCONFIRMED bug which gets enough votes becomes automatically confirmed, and enters the NEW state.
                  One implication of this is that it is worth your time to search the ! bug system for duplicates of your bug to vote on them, before ! submitting your own bug. If we can spread around knowledge of this ! fact, it ought to help cut down the number of duplicate bugs in the system.

                  Permissions.

                  --- 27,68 ----

                  Understanding the UNCONFIRMED state, and other recent changes

                  ! [This document is aimed primarily at people who have used Issuezilla before the UNCONFIRMED state was implemented. It might be helpful for newer users as well.]

                  ! New issues in some products will now show up in a new state, UNCONFIRMED. This means that we have nobody has confirmed that the ! issue is real. Very busy engineers will probably generally ignore UNCONFIRMED that have been assigned to them, until they have been confirmed in one way or another. (Engineers with more time will ! hopefully glance over their UNCONFIRMED issues regularly.)

                  ! The page describing issue fields has been updated to include UNCONFIRMED.

                  ! There are two basic ways that an issue can become confirmed (and enter the NEW) state.

                  • A user with the appropriate permissions (see below for more on ! permissions) decides that the issue is a valid one, and confirms it. We hope to gather a small army of responsible volunteers ! to regularly go through issues for us. !
                  • The issue gathers a certain number of votes. Any valid Issuezilla user may vote for ! issues (each user gets a certain number of issues); any UNCONFIRMED issue which gets enough votes becomes automatically confirmed, and enters the NEW state.
                  One implication of this is that it is worth your time to search the ! issue system for duplicates of your issue to vote on them, before ! submitting your own issue. If we can spread around knowledge of this ! fact, it ought to help cut down the number of duplicate issues in the system.

                  Permissions.

                  *************** *** 73,87 ****

                  ! If you have the "Can confirm a bug" permission, then you will be able ! to move UNCONFIRMED bugs into the NEW state.

                  ! If you have the "Can edit all aspects of any bug" permission, then you ! can tweak anything about any bug. If not, you may only edit those ! bugs that you have submitted, or that you have assigned to you (or ! qa-assigned to you). However, anyone may add a comment to any bug.

                  --- 73,87 ----

                  ! If you have the "Can confirm an issue" permission, then you will be able ! to move UNCONFIRMED issues into the NEW state.

                  ! If you have the "Can edit all aspects of any issue" permission, then you ! can tweak anything about any issue. If not, you may only edit those ! issues that you have submitted, or that you have assigned to you (or ! qa-assigned to you). However, anyone may add a comment to any issue.

                  *************** *** 89,102 **** components in the system) have the ability to give the above two permissions to other people. So, if you really feel that you ought to have one of these permissions, a good person to ask (via private ! email, please!) is the person who is assigned a relevant bug.

                  Other details.

                  An initial stab was taken to decide who would be given which of the above permissions. This was determined by some simple heurstics of ! who was assigned bugs, and who the default owners of bugs were, and a ! look at people who seem to have submitted several bugs that appear to have been interesting and valid. Inevitably, we have failed to give someone the permissions they deserve. Please don't take it personally; just bear with us as we shake out the new system. --- 89,102 ---- components in the system) have the ability to give the above two permissions to other people. So, if you really feel that you ought to have one of these permissions, a good person to ask (via private ! email, please!) is the person who is assigned a relevant issue.

                  Other details.

                  An initial stab was taken to decide who would be given which of the above permissions. This was determined by some simple heurstics of ! who was assigned issues, and who the default owners of issues were, and a ! look at people who seem to have submitted several issues that appear to have been interesting and valid. Inevitably, we have failed to give someone the permissions they deserve. Please don't take it personally; just bear with us as we shake out the new system. *************** *** 105,153 **** People with one of the two bits above can easily confirm their own ! bugs, so bugs they submit will actually start out in the NEW state. ! They can override this when submitting a bug.

                  ! People can ACCEPT or RESOLVE a bug assigned to them, even if they aren't allowed to confirm it. However, the system remembers, and if ! the bug gets REOPENED or reassigned to someone else, it will revert ! back to the UNCONFIRMED state. If the bug has ever been confirmed, then REOPENing or reassigning will cause it to go to the NEW or REOPENED state.

                  Note that only some products support the UNCONFIRMED state. In other ! products, all new bugs will automatically start in the NEW state.

                  Things still to be done.

                  ! There probably ought to be a way to get a bug back into the UNCONFIRMED state, but there isn't yet.

                  ! If a person has submitted several bugs that get confirmed, then this is probably a person who understands the system well, and deserves the ! "Can confirm a bug" permission. This kind of person should be detected and promoted automatically.

                  There should also be a way to automatically promote people to get the ! "Can edit all aspects of any bug" permission.

                  ! The "enter a new bug" page needs to be revamped with easy ways for new ! people to educate themselves on the benefit of searching for a bug like the one they're about to submit and voting on it, rather than adding a new useless duplicate.


                  ! Last modified: Wed Feb 16 21:04:56 2000 --- 105,153 ---- People with one of the two bits above can easily confirm their own ! issues, so issues they submit will actually start out in the NEW state. ! They can override this when submitting an issue.

                  ! People can ACCEPT or RESOLVE an issue assigned to them, even if they aren't allowed to confirm it. However, the system remembers, and if ! the issue gets REOPENED or reassigned to someone else, it will revert ! back to the UNCONFIRMED state. If the issue has ever been confirmed, then REOPENing or reassigning will cause it to go to the NEW or REOPENED state.

                  Note that only some products support the UNCONFIRMED state. In other ! products, all new issues will automatically start in the NEW state.

                  Things still to be done.

                  ! There probably ought to be a way to get an issue back into the UNCONFIRMED state, but there isn't yet.

                  ! If a person has submitted several issues that get confirmed, then this is probably a person who understands the system well, and deserves the ! "Can confirm an issue" permission. This kind of person should be detected and promoted automatically.

                  There should also be a way to automatically promote people to get the ! "Can edit all aspects of any issue" permission.

                  ! The "enter a new issue" page needs to be revamped with easy ways for new ! people to educate themselves on the benefit of searching for an issue like the one they're about to submit and voting on it, rather than adding a new useless duplicate.


                  ! Last modified: Sat Sep 23 11:44:42 PDT 2000 Index: createaccount.cgi =================================================================== RCS file: /cvsroot/mozilla/webtools/bugzilla/createaccount.cgi,v retrieving revision 1.9 diff -c -r1.9 createaccount.cgi *** createaccount.cgi 2000/09/15 18:35:17 1.9 --- createaccount.cgi 2000/09/29 04:57:12 *************** *** 1,4 **** ! #!/usr/bonsaitools/bin/perl -w # -*- Mode: perl; indent-tabs-mode: nil -*- # # The contents of this file are subject to the Mozilla Public --- 1,4 ---- ! #!/usr/bin/perl -w # -*- Mode: perl; indent-tabs-mode: nil -*- # # The contents of this file are subject to the Mozilla Public *************** *** 11,17 **** # 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 --- 11,17 ---- # implied. See the License for the specific language governing # rights and limitations under the License. # ! # The Original Code is the Issuezilla Issue Tracking System. # # The Initial Developer of the Original Code is Netscape Communications # Corporation. Portions created by Netscape are *************** *** 36,44 **** # Clear out the login cookies. Make people log in again if they create an # account; otherwise, they'll probably get confused. ! print "Set-Cookie: Bugzilla_login= ; path=/; expires=Sun, 30-Jun-80 00:00:00 GMT ! Set-Cookie: Bugzilla_logincookie= ; 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 "; --- 36,44 ---- # Clear out the login cookies. Make people log in again if they create an # account; otherwise, they'll probably get confused. ! print "Set-Cookie: Issuezilla_login= ; path=/; expires=Sun, 30-Jun-80 00:00:00 GMT ! Set-Cookie: Issuezilla_logincookie= ; path=/; expires=Sun, 30-Jun-80 00:00:00 GMT ! Set-Cookie: Issuezilla_password= ; path=/; expires=Sun, 30-Jun-80 00:00:00 GMT Content-type: text/html "; *************** *** 58,64 **** CheckEmailSyntax($login); if (DBname_to_id($login) != 0) { PutHeader("Account exists"); ! print "A bugzilla account for the name $login already\n"; print "exists. If you have forgotten the password for it, then\n"; print "click here and use\n"; print "the E-mail me a password button.\n"; --- 58,64 ---- CheckEmailSyntax($login); if (DBname_to_id($login) != 0) { PutHeader("Account exists"); ! print "an issuezilla account for the name $login already\n"; print "exists. If you have forgotten the password for it, then\n"; print "click here and use\n"; print "the E-mail me a password button.\n"; *************** *** 68,74 **** PutHeader("Account created"); my $password = InsertNewUser($login, $realname); MailPassword($login, $password); ! print "A bugzilla account for $login has been created. The\n"; print "password has been e-mailed to that address. When it is\n"; print "received, you may click\n"; print "here and log in."; --- 68,74 ---- PutHeader("Account created"); my $password = InsertNewUser($login, $realname); MailPassword($login, $password); ! print "an issuezilla account for $login has been created. The\n"; print "password has been e-mailed to that address. When it is\n"; print "received, you may click\n"; print "here and log in."; *************** *** 76,84 **** exit; } ! PutHeader("Create a new bugzilla account"); print q{ ! To create a bugzilla account, all that you need to do is to enter a legitimate e-mail address. The account will be created, and its password will be mailed to you. Optionally you may enter your real name as well. --- 76,84 ---- exit; } ! PutHeader("Create a new issuezilla account"); print q{ ! To create an issuezilla account, all that you need to do is to enter a legitimate e-mail address. The account will be created, and its password will be mailed to you. Optionally you may enter your real name as well. Index: createattachment.cgi =================================================================== RCS file: /cvsroot/mozilla/webtools/bugzilla/createattachment.cgi,v retrieving revision 1.11 diff -c -r1.11 createattachment.cgi *** createattachment.cgi 2000/05/17 21:29:32 1.11 --- createattachment.cgi 2000/09/29 04:57:12 *************** *** 1,4 **** ! #!/usr/bonsaitools/bin/perl -w # -*- Mode: perl; indent-tabs-mode: nil -*- # # The contents of this file are subject to the Mozilla Public --- 1,4 ---- ! #!/usr/bin/perl -w # -*- Mode: perl; indent-tabs-mode: nil -*- # # The contents of this file are subject to the Mozilla Public *************** *** 11,17 **** # 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 --- 11,17 ---- # implied. See the License for the specific language governing # rights and limitations under the License. # ! # The Original Code is the Issuezilla issue Tracking System. # # The Initial Developer of the Original Code is Netscape Communications # Corporation. Portions created by Netscape are *************** *** 43,56 **** my $id = $::FORM{'id'}; die "invalid id: $id" unless $id=~/^\s*\d+\s*$/; ! PutHeader("Create an attachment", "Create attachment", "Bug $id"); if (!defined($::FORM{'data'})) { print qq{
                  ! To attach a file to bug $id, place it in a file on your local machine, and enter the path to that file here:

                  --- 43,56 ---- my $id = $::FORM{'id'}; die "invalid id: $id" unless $id=~/^\s*\d+\s*$/; ! PutHeader("Create an attachment", "Create attachment", "Issue $id"); if (!defined($::FORM{'data'})) { print qq{ ! To attach a file to issue $id, place it in a file on your local machine, and enter the path to that file here:

                  *************** *** 95,113 **** if ($mimetype !~ m@^(\w|-)+/(\w|-)+$@) { Punt("You must select a legal mime type. '$mimetype' simply will not do."); } ! SendSQL("insert into attachments (bug_id, filename, description, mimetype, ispatch, submitter_id, thedata) values ($id," . SqlQuote($::FILENAME{'data'}) . ", " . SqlQuote($desc) . ", " . SqlQuote($mimetype) . ", $ispatch, " . ! DBNameToIdAndCheck($::COOKIE{'Bugzilla_login'}) . ", " . SqlQuote($::FORM{'data'}) . ")"); SendSQL("select LAST_INSERT_ID()"); my $attachid = FetchOneColumn(); ! AppendComment($id, $::COOKIE{"Bugzilla_login"}, "Created an attachment (id=$attachid)\n$desc\n"); ! print "

                  Attachment to bug $id created

                  \n"; ! system("./processmail", $id, $::COOKIE{'Bugzilla_login'}); ! print "
                  Go Back to BUG# $id
                  \n"; } PutFooter(); --- 95,113 ---- if ($mimetype !~ m@^(\w|-)+/(\w|-)+$@) { Punt("You must select a legal mime type. '$mimetype' simply will not do."); } ! SendSQL("insert into attachments (issue_id, filename, description, mimetype, ispatch, submitter_id, thedata) values ($id," . SqlQuote($::FILENAME{'data'}) . ", " . SqlQuote($desc) . ", " . SqlQuote($mimetype) . ", $ispatch, " . ! DBNameToIdAndCheck($::COOKIE{'Issuezilla_login'}) . ", " . SqlQuote($::FORM{'data'}) . ")"); SendSQL("select LAST_INSERT_ID()"); my $attachid = FetchOneColumn(); ! AppendComment($id, $::COOKIE{"Issuezilla_login"}, "Created an attachment (id=$attachid)\n$desc\n"); ! print "

                  Attachment to issue $id created

                  \n"; ! system("./processmail", $id, $::COOKIE{'Issuezilla_login'}); ! print "
                  Go Back to ISSUE# $id
                  \n"; } PutFooter(); Index: defparams.pl =================================================================== RCS file: /cvsroot/mozilla/webtools/bugzilla/defparams.pl,v retrieving revision 1.43 diff -c -r1.43 defparams.pl *** defparams.pl 2000/09/16 14:08:37 1.43 --- defparams.pl 2000/09/29 04:57:12 *************** *** 10,16 **** # 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 --- 10,16 ---- # implied. See the License for the specific language governing # rights and limitations under the License. # ! # The Original Code is the Issuezilla Issue Tracking System. # # The Initial Developer of the Original Code is Netscape Communications # Corporation. Portions created by Netscape are *************** *** 23,29 **** # Joe Robins # This file defines all the parameters that we have a GUI to edit within ! # Bugzilla. use diagnostics; use strict; --- 23,29 ---- # Joe Robins # This file defines all the parameters that we have a GUI to edit within ! # Issuezilla. use diagnostics; use strict; *************** *** 47,54 **** } } } ! mkdir("data", 0777); ! chmod 0777, "data"; my $tmpname = "data/params.$$"; open(FID, ">$tmpname") || die "Can't create $tmpname"; my $v = $::param{'version'}; --- 47,54 ---- } } } ! mkdir("data", 0700); ! chmod 0700, "data"; my $tmpname = "data/params.$$"; open(FID, ">$tmpname") || die "Can't create $tmpname"; my $v = $::param{'version'}; *************** *** 59,65 **** print FID "1;\n"; close FID; rename $tmpname, "data/params" || die "Can't rename $tmpname to data/params"; ! chmod 0666, "data/params"; } --- 59,65 ---- print FID "1;\n"; close FID; rename $tmpname, "data/params" || die "Can't rename $tmpname to data/params"; ! chmod 0600, "data/params"; } *************** *** 119,132 **** # "tablename.columnname". DefParam("maintainer", ! "The email address of the person who maintains this installation of Bugzilla.", "t", 'THE MAINTAINER HAS NOT YET BEEN SET'); DefParam("urlbase", ! "The URL that is the common initial leading part of all Bugzilla URLs.", "t", ! "http://cvs-mirror.mozilla.org/webtools/bugzilla/", \&check_urlbase); sub check_urlbase { --- 119,132 ---- # "tablename.columnname". DefParam("maintainer", ! "The email address of the person who maintains this installation of Issuezilla.", "t", 'THE MAINTAINER HAS NOT YET BEEN SET'); DefParam("urlbase", ! "The URL that is the common initial leading part of all Issuezilla URLs.", "t", ! "http://cvs-mirror.mozilla.org/webtools/issuezilla/", \&check_urlbase); sub check_urlbase { *************** *** 138,177 **** } DefParam("preferlists", ! "If this is on, Bugzilla will display most selection options as selection lists. If this is off, Bugzilla will use radio buttons and checkboxes instead.", "b", 1); DefParam("prettyasciimail", ! "If this is on, Bugzilla will send email reports formatted (assuming 76 character monospace font display). If this is off, email reports are sent using the old 'one-item-per-line' format.", "b", 0); DefParam("capitalizelists", ! "If this is on, Bugzilla will capitalize list entries, checkboxes, and radio buttons. If this is off, Bugzilla will leave these items untouched.", "b", 0); DefParam("usequip", ! "If this is on, Bugzilla displays a silly quip at the beginning of buglists, and lets users add to the list of quips.", "b", 1); # Added parameter - JMR, 2/16/00 ! DefParam("usebuggroups", ! "If this is on, Bugzilla will associate a bug group with each product in the database, and use it for querying bugs.", "b", 0); # Added parameter - JMR, 2/16/00 ! DefParam("usebuggroupsentry", ! "If this is on, Bugzilla will use product bug groups to restrict who can enter bugs. Requires usebuggroups to be on as well.", "b", 0); DefParam("shadowdb", ! "If non-empty, then this is the name of another database in which Bugzilla will keep a shadow read-only copy of everything. This is done so that long slow read-only operations can be used against this db, and not lock up things for everyone else. Turning on this parameter will create the given database; be careful not to use the name of an existing database with useful data in it!", "t", "", \&check_shadowdb); --- 138,177 ---- } DefParam("preferlists", ! "If this is on, Issuezilla will display most selection options as selection lists. If this is off, Issuezilla will use radio buttons and checkboxes instead.", "b", 1); DefParam("prettyasciimail", ! "If this is on, Issuezilla will send email reports formatted (assuming 76 character monospace font display). If this is off, email reports are sent using the old 'one-item-per-line' format.", "b", 0); DefParam("capitalizelists", ! "If this is on, Issuezilla will capitalize list entries, checkboxes, and radio buttons. If this is off, Issuezilla will leave these items untouched.", "b", 0); DefParam("usequip", ! "If this is on, Issuezilla displays a silly quip at the beginning of issuelists, and lets users add to the list of quips.", "b", 1); # Added parameter - JMR, 2/16/00 ! DefParam("useissuegroups", ! "If this is on, Issuezilla will associate an issue group with each product in the database, and use it for querying issues.", "b", 0); # Added parameter - JMR, 2/16/00 ! DefParam("useissuegroupsentry", ! "If this is on, Issuezilla will use product issue groups to restrict who can enter issues. Requires useissuegroups to be on as well.", "b", 0); DefParam("shadowdb", ! "If non-empty, then this is the name of another database in which Issuezilla will keep a shadow read-only copy of everything. This is done so that long slow read-only operations can be used against this db, and not lock up things for everyone else. Turning on this parameter will create the given database; be careful not to use the name of an existing database with useful data in it!", "t", "", \&check_shadowdb); *************** *** 183,189 **** DefParam("usedespot", ! "If this is on, then we are using the Despot system to control our database of users. Bugzilla won't ever write into the user database, it will let the Despot code maintain that. And Bugzilla will send the user over to Despot URLs if they need to change their password. Also, in that case, Bugzilla will treat the passwords stored in the database as being crypt'd, not plaintext.", "b", 0); --- 183,189 ---- DefParam("usedespot", ! "If this is on, then we are using the Despot system to control our database of users. Issuezilla won't ever write into the user database, it will let the Despot code maintain that. And Issuezilla will send the user over to Despot URLs if they need to change their password. Also, in that case, Issuezilla will treat the passwords stored in the database as being crypt'd, not plaintext.", "b", 0); *************** *** 206,212 **** # Adding in four parameters for LDAP authentication. -JMR, 7/28/00 DefParam("useLDAP", "Turn this on to use an LDAP directory for user authentication ". ! "instead of the Bugzilla database. (User profiles will still be ". "stored in the database, and will match against the LDAP user by ". "email address.)", "b", --- 206,212 ---- # Adding in four parameters for LDAP authentication. -JMR, 7/28/00 DefParam("useLDAP", "Turn this on to use an LDAP directory for user authentication ". ! "instead of the Issuezilla database. (User profiles will still be ". "stored in the database, and will match against the LDAP user by ". "email address.)", "b", *************** *** 264,270 **** DefParam("bannerhtml", ! "The html that gets emitted at the head of every Bugzilla page. Anything of the form %word% gets replaced by the defintion of that word (as defined on this page).", "l", --- 264,270 ---- DefParam("bannerhtml", ! "The html that gets emitted at the head of every Issuezilla page. Anything of the form %word% gets replaced by the defintion of that word (as defined on this page).", "l", *************** *** 272,303 **** !

                  Bugzilla version %version%
                  }); DefParam("blurbhtml", ! "A blurb that appears as part of the header of every Bugzilla page. This is a place to put brief warnings, pointers to one or two related pages, etc.", "l", ! "This is Bugzilla: the Mozilla bug system. For more ! information about what Bugzilla is and what it can do, see mozilla.org's ! bug pages."); ! DefParam("mybugstemplate", ! "This is the URL to use to bring up a simple 'all of my bugs' list for a user. %userid% will get replaced with the login name of a user.", "t", ! "buglist.cgi?bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&email1=%userid%&emailtype1=exact&emailassigned_to1=1&emailreporter1=1"); DefParam("shutdownhtml", ! "If this field is non-empty, then Bugzilla will be completely disabled and this text will be displayed instead of all the Bugzilla pages.", "l", ""); DefParam("sendmailnow", ! "If this is on, Bugzilla will tell sendmail to send any e-mail immediately. If you have a large number of users with a large amount of e-mail traffic, enabling this option may dramatically slow down Bugzilla. Best used for smaller installations of Bugzilla.", "b", 0); --- 272,303 ---- !
                  Issuezilla version %version%
                  }); DefParam("blurbhtml", ! "A blurb that appears as part of the header of every Issuezilla page. This is a place to put brief warnings, pointers to one or two related pages, etc.", "l", ! "This is Issuezilla: the Mozilla issue system. For more ! information about what Issuezilla is and what it can do, see mozilla.org's ! issue pages."); ! DefParam("myissuestemplate", ! "This is the URL to use to bring up a simple 'all of my issues' list for a user. %userid% will get replaced with the login name of a user.", "t", ! "buglist.cgi?issue_status=NEW&issue_status=ASSIGNED&issue_status=REOPENED&email1=%userid%&emailtype1=exact&emailassigned_to1=1&emailreporter1=1"); DefParam("shutdownhtml", ! "If this field is non-empty, then Issuezilla will be completely disabled and this text will be displayed instead of all the Issuezilla pages.", "l", ""); DefParam("sendmailnow", ! "If this is on, Issuezilla will tell sendmail to send any e-mail immediately. If you have a large number of users with a large amount of e-mail traffic, enabling this option may dramatically slow down Issuezilla. Best used for smaller installations of Issuezilla.", "b", 0); *************** *** 308,318 **** %password% gets replaced by their password. %anythingelse% gets replaced by the definition of that parameter (as defined on this page).}, "l", ! q{From: bugzilla-daemon To: %mailaddress% ! Subject: Your Bugzilla password. ! To use the wonders of Bugzilla, you can use the following: E-mail address: %login% Password: %password% --- 308,318 ---- %password% gets replaced by their password. %anythingelse% gets replaced by the definition of that parameter (as defined on this page).}, "l", ! q{From: issuezilla-daemon To: %mailaddress% ! Subject: Your Issuezilla password. ! To use the wonders of Issuezilla, you can use the following: E-mail address: %login% Password: %password% *************** *** 324,352 **** DefParam("changedmail", ! q{The email that gets sent to people when a bug changes. Within this text, %to% gets replaced by the assigned-to and reported-by people, separated by a comma (with duplication removed, if they're the same person). %cc% gets replaced by the list of people on the CC list, ! separated by commas. %bugid% gets replaced by the bug number. %diffs% gets replaced by the diff text from the old version to the new ! version of this bug. %neworchanged% is either "New" or "Changed", ! depending on whether this mail is reporting a new bug or changes made to an existing one. %summary% gets replaced by the summary of this ! bug. %anythingelse% gets replaced by the definition of that parameter (as defined on this page).}, "l", ! "From: bugzilla-daemon To: %to% Cc: %cc% ! Subject: [Bug %bugid%] %neworchanged% - %summary% ! %urlbase%show_bug.cgi?id=%bugid% %diffs%"); DefParam("newemailtech", ! q{There is now experimental code in Bugzilla to do the email diffs in a new and exciting way. But this stuff is not very cooked yet. So, right now, to use it, the maintainer has to turn on this checkbox, and each user has to then turn on the "New email tech" preference.}, --- 324,352 ---- DefParam("changedmail", ! q{The email that gets sent to people when an issue changes. Within this text, %to% gets replaced by the assigned-to and reported-by people, separated by a comma (with duplication removed, if they're the same person). %cc% gets replaced by the list of people on the CC list, ! separated by commas. %issueid% gets replaced by the issue number. %diffs% gets replaced by the diff text from the old version to the new ! version of this issue. %neworchanged% is either "New" or "Changed", ! depending on whether this mail is reporting a new issue or changes made to an existing one. %summary% gets replaced by the summary of this ! issue. %anythingelse% gets replaced by the definition of that parameter (as defined on this page).}, "l", ! "From: issuezilla-daemon To: %to% Cc: %cc% ! Subject: [Issue %issueid%] %neworchanged% - %summary% ! %urlbase%show_bug.cgi?id=%issueid% %diffs%"); DefParam("newemailtech", ! q{There is now experimental code in Issuezilla to do the email diffs in a new and exciting way. But this stuff is not very cooked yet. So, right now, to use it, the maintainer has to turn on this checkbox, and each user has to then turn on the "New email tech" preference.}, *************** *** 357,432 **** DefParam("newchangedmail", q{The same as 'changedmail', but used for the newemailtech stuff.}, "l", ! "From: bugzilla-daemon To: %to% Cc: %cc% ! Subject: [Bug %bugid%] %neworchanged% - %summary% ! %urlbase%show_bug.cgi?id=%bugid% %diffs%"); DefParam("whinedays", ! "The number of days that we'll let a bug sit untouched in a NEW state before our cronjob will whine at the owner.", "t", 7, \&check_numeric); DefParam("whinemail", ! "The email that gets sent to anyone who has a NEW bug that hasn't been touched for more than whinedays. Within this text, %email% gets replaced by the offender's email address. %userid% gets replaced by the offender's bugzilla login (which, in most installations, is the same as the email address.) %anythingelse% gets replaced by the definition of that parameter (as defined on this page).

                  It is a good idea to make sure this message has a valid From: address, so that if the mail bounces, a real person can know that there are bugs assigned to an invalid address.", "l", q{From: %maintainer% To: %email% ! Subject: Your Bugzilla buglist needs attention. [This e-mail has been automatically generated.] ! You have one or more bugs assigned to you in the Bugzilla ! bugsystem (%urlbase%) that require attention. ! All of these bugs are in the NEW state, and have not been touched in %whinedays% days or more. You need to take a look at them, and decide on an initial action. Generally, this means one of three things: ! (1) You decide this bug is really quick to deal with (like, it's INVALID), and so you get rid of it immediately. ! (2) You decide the bug doesn't belong to you, and you reassign it to someone else. (Hint: if you don't know who to reassign it to, make sure that ! the Component field seems reasonable, and then use the "Reassign bug to owner of selected component" option.) ! (3) You decide the bug belongs to you, but you can't solve it this moment. ! Just use the "Accept bug" command. ! To get a list of all NEW bugs, you can use this URL (bookmark it if you like!): ! %urlbase%buglist.cgi?bug_status=NEW&assigned_to=%userid% Or, you can use the general query page, at %urlbase%query.cgi. ! Appended below are the individual URLs to get to all of your NEW bugs that haven't been touched for a week or more. ! You will get this message once a day until you've dealt with these bugs! }); DefParam("defaultquery", ! "This is the default query that initially comes up when you submit a bug. It's in URL parameter format, which makes it hard to read. Sorry!", "t", ! "bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&order=%22Importance%22"); DefParam("letsubmitterchoosepriority", ! "If this is on, then people submitting bugs can choose an initial priority for that bug. If off, then all bugs initially have the default priority selected below.", "b", 1); --- 357,432 ---- DefParam("newchangedmail", q{The same as 'changedmail', but used for the newemailtech stuff.}, "l", ! "From: issuezilla-daemon To: %to% Cc: %cc% ! Subject: [Issue %issueid%] %neworchanged% - %summary% ! %urlbase%show_bug.cgi?id=%issueid% %diffs%"); DefParam("whinedays", ! "The number of days that we'll let an issue sit untouched in a NEW state before our cronjob will whine at the owner.", "t", 7, \&check_numeric); DefParam("whinemail", ! "The email that gets sent to anyone who has a NEW issue that hasn't been touched for more than whinedays. Within this text, %email% gets replaced by the offender's email address. %userid% gets replaced by the offender's issuezilla login (which, in most installations, is the same as the email address.) %anythingelse% gets replaced by the definition of that parameter (as defined on this page).

                  It is a good idea to make sure this message has a valid From: address, so that if the mail bounces, a real person can know that there are issues assigned to an invalid address.", "l", q{From: %maintainer% To: %email% ! Subject: Your Issuezilla issuelist needs attention. [This e-mail has been automatically generated.] ! You have one or more issues assigned to you in the Issuezilla ! issuesystem (%urlbase%) that require attention. ! All of these issues are in the NEW state, and have not been touched in %whinedays% days or more. You need to take a look at them, and decide on an initial action. Generally, this means one of three things: ! (1) You decide this issue is really quick to deal with (like, it's INVALID), and so you get rid of it immediately. ! (2) You decide the issue doesn't belong to you, and you reassign it to someone else. (Hint: if you don't know who to reassign it to, make sure that ! the Component field seems reasonable, and then use the "Reassign issue to owner of selected component" option.) ! (3) You decide the issue belongs to you, but you can't solve it this moment. ! Just use the "Accept issue" command. ! To get a list of all NEW issues, you can use this URL (bookmark it if you like!): ! %urlbase%buglist.cgi?issue_status=NEW&assigned_to=%userid% Or, you can use the general query page, at %urlbase%query.cgi. ! Appended below are the individual URLs to get to all of your NEW issues that haven't been touched for a week or more. ! You will get this message once a day until you've dealt with these issues! }); DefParam("defaultquery", ! "This is the default query that initially comes up when you submit a issue. It's in URL parameter format, which makes it hard to read. Sorry!", "t", ! "issue_status=NEW&issue_status=ASSIGNED&issue_status=REOPENED&order=%22Importance%22"); DefParam("letsubmitterchoosepriority", ! "If this is on, then people submitting issues can choose an initial priority for that issue. If off, then all issues initially have the default priority selected below.", "b", 1); *************** *** 442,448 **** } DefParam("defaultpriority", ! "This is the priority that newly entered bugs are set to.", "t", "P2", \&check_priority); --- 442,448 ---- } DefParam("defaultpriority", ! "This is the priority that newly entered issues are set to.", "t", "P2", \&check_priority); *************** *** 467,473 **** \&check_numeric); DefParam("musthavemilestoneonaccept", ! "If you are using Target Milestone, do you want to require that the milestone be set in order for a user to ACCEPT a bug?", "b", 0); --- 467,473 ---- \&check_numeric); DefParam("musthavemilestoneonaccept", ! "If you are using Target Milestone, do you want to require that the milestone be set in order for a user to ACCEPT an issue?", "b", 0); *************** *** 482,509 **** 0); DefParam("usebrowserinfo", ! "Do you want bug reports to be assigned an OS & Platform based on the browser the user makes the report from?", "b", 1); DefParam("usedependencies", ! "Do you wish to use dependencies (allowing you to mark which bugs depend on which other ones)?", "b", 1); DefParam("webdotbase", ! "This is the URL prefix that is common to all requests for webdot. The webdot package is a very swell thing that generates pictures of graphs. If you have an installation of bugsplat that hides behind a firewall, then to get graphs to work, you will have to install a copy of webdot behind your firewall, and change this path to match. Also, webdot has some trouble with software domain names, so you may have to play games and hack the %urlbase% part of this. If this all seems like too much trouble, you can set this paramater to be the empty string, which will cause the graphing feature to be disabled entirely.", "t", "http://www.research.att.com/~north/cgi-bin/webdot.cgi/%urlbase%"); DefParam("entryheaderhtml", ! "This is a special header for the bug entry page. The text will be printed after the page header, before the bug entry form. It is meant to be a place to put pointers to intructions on how to enter bugs.", "l", ! 'Bug writing guidelines'); DefParam("expectbigqueries", ! "If this is on, then we will tell mysql to set option SQL_BIG_TABLES=1 before doing queries on bugs. This will be a little slower, but one will not get the error The table ### is full for big queries that require a big temporary table.", "b", 0); --- 482,509 ---- 0); DefParam("usebrowserinfo", ! "Do you want issue reports to be assigned an OS & Platform based on the browser the user makes the report from?", "b", 1); DefParam("usedependencies", ! "Do you wish to use dependencies (allowing you to mark which issues depend on which other ones)?", "b", 1); DefParam("webdotbase", ! "This is the URL prefix that is common to all requests for webdot. The webdot package is a very swell thing that generates pictures of graphs. If you have an installation of issuesplat that hides behind a firewall, then to get graphs to work, you will have to install a copy of webdot behind your firewall, and change this path to match. Also, webdot has some trouble with software domain names, so you may have to play games and hack the %urlbase% part of this. If this all seems like too much trouble, you can set this paramater to be the empty string, which will cause the graphing feature to be disabled entirely.", "t", "http://www.research.att.com/~north/cgi-bin/webdot.cgi/%urlbase%"); DefParam("entryheaderhtml", ! "This is a special header for the issue entry page. The text will be printed after the page header, before the issue entry form. It is meant to be a place to put pointers to intructions on how to enter issues.", "l", ! 'Issue writing guidelines'); DefParam("expectbigqueries", ! "If this is on, then we will tell mysql to set option SQL_BIG_TABLES=1 before doing queries on issues. This will be a little slower, but one will not get the error The table ### is full for big queries that require a big temporary table.", "b", 0); *************** *** 524,546 **** DefParam("voteremovedmail", ! q{This is a mail message to send to anyone who gets a vote removed from a bug for any reason. %to% gets replaced by a comma-separated list of people who used to be voting for this bug. %bugid% gets replaced by the bug number. %reason% gets replaced by a short reason describing why the vote was removed. %count% is how many votes got removed.%anythingelse% gets replaced by the definition of that parameter (as defined on this page).}, "l", ! "From: bugzilla-daemon To: %to% ! Subject: [Bug %bugid%] Your vote has been removed from this bug ! You used to have a vote on bug %bugid%, but it has been removed. Reason: %reason% Votes removed: %count% ! %urlbase%show_bug.cgi?id=%bugid% "); ! DefParam("allowbugdeletion", ! q{The pages to edit products and components and versions can delete all associated bugs when you delete a product (or component or version). Since that is a pretty scary idea, you have to turn on this option before any such deletions will ever happen.}, "b", 0); --- 524,546 ---- DefParam("voteremovedmail", ! q{This is a mail message to send to anyone who gets a vote removed from an issue for any reason. %to% gets replaced by a comma-separated list of people who used to be voting for this issue. %issueid% gets replaced by the issue number. %reason% gets replaced by a short reason describing why the vote was removed. %count% is how many votes got removed.%anythingelse% gets replaced by the definition of that parameter (as defined on this page).}, "l", ! "From: issuezilla-daemon To: %to% ! Subject: [Issue %issueid%] Your vote has been removed from this issue ! You used to have a vote on issue %issueid%, but it has been removed. Reason: %reason% Votes removed: %count% ! %urlbase%show_bug.cgi?id=%issueid% "); ! DefParam("allowissuedeletion", ! q{The pages to edit products and components and versions can delete all associated issues when you delete a product (or component or version). Since that is a pretty scary idea, you have to turn on this option before any such deletions will ever happen.}, "b", 0); *************** *** 557,638 **** 0); ! DefParam("browserbugmessage", ! "If strictvaluechecks is on, and the bugzilla gets unexpected data from the browser, in addition to displaying the cause of the problem, it will output this HTML as well.", "l", ! "this may indicate a bug in your browser.\n"); # # Parameters to force users to comment their changes for different actions. DefParam("commentonaccept", ! "If this option is on, the user needs to enter a short comment if he accepts the bug", "b", 0 ); DefParam("commentonclearresolution", ! "If this option is on, the user needs to enter a short comment if the bugs resolution is cleared", "b", 0 ); DefParam("commentonconfirm", ! "If this option is on, the user needs to enter a short comment when confirming a bug", "b", 0 ); DefParam("commentonresolve", ! "If this option is on, the user needs to enter a short comment if the bug is resolved", "b", 0 ); DefParam("commentonreassign", ! "If this option is on, the user needs to enter a short comment if the bug is reassigned", "b", 0 ); DefParam("commentonreassignbycomponent", ! "If this option is on, the user needs to enter a short comment if the bug is reassigned by component", "b", 0 ); DefParam("commentonreopen", ! "If this option is on, the user needs to enter a short comment if the bug is reopened", "b", 0 ); DefParam("commentonverify", ! "If this option is on, the user needs to enter a short comment if the bug is verified", "b", 0 ); DefParam("commentonclose", ! "If this option is on, the user needs to enter a short comment if the bug is closed", "b", 0 ); DefParam("commentonduplicate", ! "If this option is on, the user needs to enter a short comment if the bug is marked as duplicate", "b", 0 ); DefParam("supportwatchers", "Support one user watching (ie getting copies of all related email" . ! " about) another's bugs. Useful for people going on vacation, and" . ! " QA folks watching particular developers' bugs", "b", 0 ); DefParam("move-enabled", ! "If this is on, Bugzilla will allow certain people to move bugs to the defined database.", "b", 0); DefParam("move-button-text", ! "The text written on the Move button. Explain where the bug is being moved to.", "t", ! 'Move To Bugscape'); DefParam("move-to-url", ! "The URL of the database we allow some of our bugs to be moved to.", "t", ''); DefParam("move-to-address", ! "To move bugs, an email is sent to the target database. This is the email address that database ! uses to listen for incoming bugs.", "t", ! 'bugzilla-import'); DefParam("moved-from-address", ! "To move bugs, an email is sent to the target database. This is the email address from which this mail, and error messages are sent.", "t", ! 'bugzilla-admin'); DefParam("movers", ! "A list of people with permission to move bugs and reopen moved bugs (in case the move operation fails).", "t", ''); DefParam("moved-default-product", ! "Bugs moved from other databases to here are assigned to this product.", "t", ''); DefParam("moved-default-component", ! "Bugs moved from other databases to here are assigned to this component.", "t", ''); --- 557,638 ---- 0); ! DefParam("browserissuemessage", ! "If strictvaluechecks is on, and the issuezilla gets unexpected data from the browser, in addition to displaying the cause of the problem, it will output this HTML as well.", "l", ! "this may indicate an issue in your browser.\n"); # # Parameters to force users to comment their changes for different actions. DefParam("commentonaccept", ! "If this option is on, the user needs to enter a short comment if he accepts the issue", "b", 0 ); DefParam("commentonclearresolution", ! "If this option is on, the user needs to enter a short comment if the issues resolution is cleared", "b", 0 ); DefParam("commentonconfirm", ! "If this option is on, the user needs to enter a short comment when confirming an issue", "b", 0 ); DefParam("commentonresolve", ! "If this option is on, the user needs to enter a short comment if the issue is resolved", "b", 0 ); DefParam("commentonreassign", ! "If this option is on, the user needs to enter a short comment if the issue is reassigned", "b", 0 ); DefParam("commentonreassignbycomponent", ! "If this option is on, the user needs to enter a short comment if the issue is reassigned by component", "b", 0 ); DefParam("commentonreopen", ! "If this option is on, the user needs to enter a short comment if the issue is reopened", "b", 0 ); DefParam("commentonverify", ! "If this option is on, the user needs to enter a short comment if the issue is verified", "b", 0 ); DefParam("commentonclose", ! "If this option is on, the user needs to enter a short comment if the issue is closed", "b", 0 ); DefParam("commentonduplicate", ! "If this option is on, the user needs to enter a short comment if the issue is marked as duplicate", "b", 0 ); DefParam("supportwatchers", "Support one user watching (ie getting copies of all related email" . ! " about) another's issues. Useful for people going on vacation, and" . ! " QA folks watching particular developers' issues", "b", 0 ); DefParam("move-enabled", ! "If this is on, Issuezilla will allow certain people to move issues to the defined database.", "b", 0); DefParam("move-button-text", ! "The text written on the Move button. Explain where the issue is being moved to.", "t", ! 'Move To Issuescape'); DefParam("move-to-url", ! "The URL of the database we allow some of our issues to be moved to.", "t", ''); DefParam("move-to-address", ! "To move issues, an email is sent to the target database. This is the email address that database ! uses to listen for incoming issues.", "t", ! 'issuezilla-import'); DefParam("moved-from-address", ! "To move issues, an email is sent to the target database. This is the email address from which this mail, and error messages are sent.", "t", ! 'issuezilla-admin'); DefParam("movers", ! "A list of people with permission to move issues and reopen moved issues (in case the move operation fails).", "t", ''); DefParam("moved-default-product", ! "Issues moved from other databases to here are assigned to this product.", "t", ''); DefParam("moved-default-component", ! "Issues moved from other databases to here are assigned to this component.", "t", ''); Index: describecomponents.cgi =================================================================== RCS file: /cvsroot/mozilla/webtools/bugzilla/describecomponents.cgi,v retrieving revision 1.4 diff -c -r1.4 describecomponents.cgi *** describecomponents.cgi 2000/01/14 22:35:30 1.4 --- describecomponents.cgi 2000/09/29 04:57:12 *************** *** 1,4 **** ! #!/usr/bonsaitools/bin/perl -w # -*- Mode: perl; indent-tabs-mode: nil -*- # # The contents of this file are subject to the Mozilla Public --- 1,4 ---- ! #!/usr/bin/perl -w # -*- Mode: perl; indent-tabs-mode: nil -*- # # The contents of this file are subject to the Mozilla Public *************** *** 11,17 **** # 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 --- 11,17 ---- # implied. See the License for the specific language governing # rights and limitations under the License. # ! # The Original Code is the Issuezilla Issue Tracking System. # # The Initial Developer of the Original Code is Netscape Communications # Corporation. Portions created by Netscape are *************** *** 35,41 **** my $product = $::FORM{'product'}; if (!defined $product || lsearch(\@::legal_product, $product) < 0) { ! PutHeader("Bugzilla component description"); print " Please specify the product whose components you want described. --- 35,41 ---- my $product = $::FORM{'product'}; if (!defined $product || lsearch(\@::legal_product, $product) < 0) { ! PutHeader("Issuezilla component description"); print " Please specify the product whose components you want described. *************** *** 54,60 **** } ! PutHeader("Bugzilla component description", "Bugzilla component description", $product); print " --- 54,60 ---- } ! PutHeader("Issuezilla component description", "Issuezilla component description", $product); print " Index: describekeywords.cgi =================================================================== RCS file: /cvsroot/mozilla/webtools/bugzilla/describekeywords.cgi,v retrieving revision 1.4 diff -c -r1.4 describekeywords.cgi *** describekeywords.cgi 2000/01/22 16:51:49 1.4 --- describekeywords.cgi 2000/09/29 04:57:12 *************** *** 1,4 **** ! #!/usr/bonsaitools/bin/perl -w # -*- Mode: perl; indent-tabs-mode: nil -*- # # The contents of this file are subject to the Mozilla Public --- 1,4 ---- ! #!/usr/bin/perl -w # -*- Mode: perl; indent-tabs-mode: nil -*- # # The contents of this file are subject to the Mozilla Public *************** *** 11,17 **** # 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 Terry Weissman. # Portions created by Terry Weissman are --- 11,17 ---- # implied. See the License for the specific language governing # rights and limitations under the License. # ! # The Original Code is the Issuezilla Issue Tracking System. # # The Initial Developer of the Original Code is Terry Weissman. # Portions created by Terry Weissman are *************** *** 29,42 **** print "Content-type: text/html\n\n"; ! PutHeader("Bugzilla keyword description"); my $tableheader = qq{ ! }; --- 29,42 ---- print "Content-type: text/html\n\n"; ! PutHeader("Issuezilla keyword description"); my $tableheader = qq{
                  Name DescriptionBugs
                  ! }; *************** *** 45,67 **** my $max_table_size = 50; SendSQL("SELECT keyworddefs.name, keyworddefs.description, ! COUNT(keywords.bug_id), keywords.bug_id FROM keyworddefs LEFT JOIN keywords ON keyworddefs.id=keywords.keywordid GROUP BY keyworddefs.id ORDER BY keyworddefs.name"); while (MoreSQLData()) { ! my ($name, $description, $bugs, $onebug) = FetchSQLData(); ! if ($bugs && $onebug) { ! # This 'onebug' stuff is silly hackery for old versions of # MySQL that seem to return a count() of 1 even if there are ! # no matching. So, we ask for an actual bug number. If it ! # can't find any bugs that match the keyword, then we set the # count to be zero, ignoring what it had responded. my $q = url_quote($name); ! $bugs = qq{$bugs}; } else { ! $bugs = "none"; } if ($line_count == $max_table_size) { print "
                  Name DescriptionIssues
                  \n$tableheader"; --- 45,67 ---- my $max_table_size = 50; SendSQL("SELECT keyworddefs.name, keyworddefs.description, ! COUNT(keywords.issue_id), keywords.issue_id FROM keyworddefs LEFT JOIN keywords ON keyworddefs.id=keywords.keywordid GROUP BY keyworddefs.id ORDER BY keyworddefs.name"); while (MoreSQLData()) { ! my ($name, $description, $issues, $oneissue) = FetchSQLData(); ! if ($issues && $oneissue) { ! # This 'oneissue' stuff is silly hackery for old versions of # MySQL that seem to return a count() of 1 even if there are ! # no matching. So, we ask for an actual issue number. If it ! # can't find any issues that match the keyword, then we set the # count to be zero, ignoring what it had responded. my $q = url_quote($name); ! $issues = qq{$issues}; } else { ! $issues = "none"; } if ($line_count == $max_table_size) { print "\n$tableheader"; *************** *** 72,78 **** $name $description ! $bugs }; } --- 72,78 ---- $name $description ! $issues }; } Index: doeditparams.cgi =================================================================== RCS file: /cvsroot/mozilla/webtools/bugzilla/doeditparams.cgi,v retrieving revision 1.11 diff -c -r1.11 doeditparams.cgi *** doeditparams.cgi 2000/05/17 21:29:32 1.11 --- doeditparams.cgi 2000/09/29 04:57:12 *************** *** 1,4 **** ! #!/usr/bonsaitools/bin/perl -w # -*- Mode: perl; indent-tabs-mode: nil -*- # # The contents of this file are subject to the Mozilla Public --- 1,4 ---- ! #!/usr/bin/perl -w # -*- Mode: perl; indent-tabs-mode: nil -*- # # The contents of this file are subject to the Mozilla Public *************** *** 11,17 **** # 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 --- 11,17 ---- # implied. See the License for the specific language governing # rights and limitations under the License. # ! # The Original Code is the Issuezilla Issue Tracking System. # # The Initial Developer of the Original Code is Netscape Communications # Corporation. Portions created by Netscape are Index: doeditvotes.cgi =================================================================== RCS file: /cvsroot/mozilla/webtools/bugzilla/doeditvotes.cgi,v retrieving revision 1.8 diff -c -r1.8 doeditvotes.cgi *** doeditvotes.cgi 2000/06/07 17:49:02 1.8 --- doeditvotes.cgi 2000/09/29 04:57:12 *************** *** 1,4 **** ! #!/usr/bonsaitools/bin/perl -w # -*- Mode: perl; indent-tabs-mode: nil -*- # # The contents of this file are subject to the Mozilla Public --- 1,4 ---- ! #!/usr/bin/perl -w # -*- Mode: perl; indent-tabs-mode: nil -*- # # The contents of this file are subject to the Mozilla Public *************** *** 11,17 **** # 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 --- 11,17 ---- # implied. See the License for the specific language governing # rights and limitations under the License. # ! # The Original Code is the Issuezilla Issue Tracking System. # # The Initial Developer of the Original Code is Netscape Communications # Corporation. Portions created by Netscape are *************** *** 32,72 **** ConnectToDatabase(); GetVersionTable(); ! my $who = DBNameToIdAndCheck($::COOKIE{'Bugzilla_login'}); if ( (! defined $who) || (!$who) ) { PutHeader("Bad login."); print "The login info got confused. If you want to adjust the votes\n"; ! print "for $::COOKIE{'Bugzilla_login'}, then please\n"; print "click here.


                  \n"; PutFooter(); exit(); } ! my @buglist = grep {/^\d+$/} keys(%::FORM); ! if (0 == @buglist) { PutHeader("Oops?"); print "Something got confused. Please click Back and try again."; PutFooter(); exit(); } ! foreach my $id (@buglist) { $::FORM{$id} = trim($::FORM{$id}); if ($::FORM{$id} !~ /\d+/ || $::FORM{$id} < 0) { PutHeader("Numbers only, please"); ! print "Only use numeric values for your bug votes.\n"; print "Please click Back and try again.
                  \n"; PutFooter(); exit(); } } ! SendSQL("SELECT bugs.bug_id, bugs.product, products.maxvotesperbug " . ! "FROM bugs, products " . ! "WHERE products.product = bugs.product ". ! " AND bugs.bug_id IN (" . join(", ", @buglist) . ")"); my %prodcount; --- 32,72 ---- ConnectToDatabase(); GetVersionTable(); ! my $who = DBNameToIdAndCheck($::COOKIE{'Issuezilla_login'}); if ( (! defined $who) || (!$who) ) { PutHeader("Bad login."); print "The login info got confused. If you want to adjust the votes\n"; ! print "for $::COOKIE{'Issuezilla_login'}, then please\n"; print "click here.
                  \n"; PutFooter(); exit(); } ! my @issuelist = grep {/^\d+$/} keys(%::FORM); ! if (0 == @issuelist) { PutHeader("Oops?"); print "Something got confused. Please click Back and try again."; PutFooter(); exit(); } ! foreach my $id (@issuelist) { $::FORM{$id} = trim($::FORM{$id}); if ($::FORM{$id} !~ /\d+/ || $::FORM{$id} < 0) { PutHeader("Numbers only, please"); ! print "Only use numeric values for your issue votes.\n"; print "Please click Back and try again.
                  \n"; PutFooter(); exit(); } } ! SendSQL("SELECT issues.issue_id, issues.product, products.maxvotesperissue " . ! "FROM issues, products " . ! "WHERE products.product = issues.product ". ! " AND issues.issue_id IN (" . join(", ", @issuelist) . ")"); my %prodcount; *************** *** 78,84 **** $prodcount{$prod} += $::FORM{$id}; if ($::FORM{$id} > $max) { PutHeader("Don't overstuff!", "Illegal vote"); ! print "You may only use at most $max votes for a single bug in the\n"; print "$prod product, but you are using $::FORM{$id}.\n"; print "

                  Please click Back and try again.


                  \n"; PutFooter(); --- 78,84 ---- $prodcount{$prod} += $::FORM{$id}; if ($::FORM{$id} > $max) { PutHeader("Don't overstuff!", "Illegal vote"); ! print "You may only use at most $max votes for a single issue in the\n"; print "$prod product, but you are using $::FORM{$id}.\n"; print "

                  Please click Back and try again.


                  \n"; PutFooter(); *************** *** 89,95 **** foreach my $prod (keys(%prodcount)) { if ($prodcount{$prod} > $::prodmaxvotes{$prod}) { PutHeader("Don't overstuff!", "Illegal vote"); ! print "You may only use $::prodmaxvotes{$prod} votes for bugs in the\n"; print "$prod product, but you are using $prodcount{$prod}.\n"; print "

                  Please click Back and try again.


                  \n"; PutFooter(); --- 89,95 ---- foreach my $prod (keys(%prodcount)) { if ($prodcount{$prod} > $::prodmaxvotes{$prod}) { PutHeader("Don't overstuff!", "Illegal vote"); ! print "You may only use $::prodmaxvotes{$prod} votes for issues in the\n"; print "$prod product, but you are using $prodcount{$prod}.\n"; print "

                  Please click Back and try again.


                  \n"; PutFooter(); *************** *** 98,126 **** } my %affected; ! SendSQL("lock tables bugs write, votes write"); ! SendSQL("select bug_id from votes where who = $who"); while (MoreSQLData()) { my $id = FetchOneColumn(); $affected{$id} = 1; } SendSQL("delete from votes where who = $who"); ! foreach my $id (@buglist) { if ($::FORM{$id} > 0) { ! SendSQL("insert into votes (who, bug_id, count) values ($who, $id, $::FORM{$id})"); } $affected{$id} = 1; } foreach my $id (keys %affected) { ! SendSQL("select sum(count) from votes where bug_id = $id"); my $v = FetchOneColumn(); $v ||= 0; ! SendSQL("update bugs set votes = $v, delta_ts=delta_ts where bug_id = $id"); } SendSQL("unlock tables"); ! PutHeader("Voting tabulated", "Voting tabulated", $::COOKIE{'Bugzilla_login'}); print "Your votes have been recorded.\n"; print qq{

                  Review your votes


                  \n}; foreach my $id (keys %affected) { --- 98,126 ---- } my %affected; ! SendSQL("lock tables issues write, votes write"); ! SendSQL("select issue_id from votes where who = $who"); while (MoreSQLData()) { my $id = FetchOneColumn(); $affected{$id} = 1; } SendSQL("delete from votes where who = $who"); ! foreach my $id (@issuelist) { if ($::FORM{$id} > 0) { ! SendSQL("insert into votes (who, issue_id, count) values ($who, $id, $::FORM{$id})"); } $affected{$id} = 1; } foreach my $id (keys %affected) { ! SendSQL("select sum(count) from votes where issue_id = $id"); my $v = FetchOneColumn(); $v ||= 0; ! SendSQL("update issues set votes = $v, delta_ts=delta_ts where issue_id = $id"); } SendSQL("unlock tables"); ! PutHeader("Voting tabulated", "Voting tabulated", $::COOKIE{'Issuezilla_login'}); print "Your votes have been recorded.\n"; print qq{

                  Review your votes


                  \n}; foreach my $id (keys %affected) { Index: editcomponents.cgi =================================================================== RCS file: /cvsroot/mozilla/webtools/bugzilla/editcomponents.cgi,v retrieving revision 1.15 diff -c -r1.15 editcomponents.cgi *** editcomponents.cgi 2000/09/10 16:54:04 1.15 --- editcomponents.cgi 2000/09/29 04:57:12 *************** *** 1,4 **** ! #!/usr/bonsaitools/bin/perl -w # -*- Mode: perl; indent-tabs-mode: nil -*- # # The contents of this file are subject to the Mozilla Public --- 1,4 ---- ! #!/usr/bin/perl -w # -*- Mode: perl; indent-tabs-mode: nil -*- # # The contents of this file are subject to the Mozilla Public *************** *** 40,46 **** } ! my $dobugcounts = (defined $::FORM{'dobugcounts'}); --- 40,46 ---- } ! my $doissuecounts = (defined $::FORM{'doissuecounts'}); *************** *** 154,162 **** my $count = $#links; my $num = 0; print "

                  \n"; ! if (!$dobugcounts) { ! print qq{}; ! print qq{Redisplay table with bug counts (slower)

                  \n}; } foreach (@links) { print $_; --- 154,162 ---- my $count = $#links; my $num = 0; print "

                  \n"; ! if (!$doissuecounts) { ! print qq{}; ! print qq{Redisplay table with issue counts (slower)

                  \n}; } foreach (@links) { print $_; *************** *** 219,228 **** unless ($product) { PutHeader("Select product"); ! if ($dobugcounts){ ! SendSQL("SELECT products.product,products.description,COUNT(bug_id) ! FROM products LEFT JOIN bugs ! ON products.product=bugs.product GROUP BY products.product ORDER BY products.product"); } else { --- 219,228 ---- unless ($product) { PutHeader("Select product"); ! if ($doissuecounts){ ! SendSQL("SELECT products.product,products.description,COUNT(issue_id) ! FROM products LEFT JOIN issues ! ON products.product=issues.product GROUP BY products.product ORDER BY products.product"); } else { *************** *** 233,252 **** print "\n"; print " \n"; print " \n"; ! if ($dobugcounts) { ! print " \n"; } #print " \n"; print ""; while ( MoreSQLData() ) { ! my ($product, $description, $bugs) = FetchSQLData(); $description ||= "missing"; print "\n"; print " \n"; print " \n"; ! if ($dobugcounts) { ! $bugs ||= "none"; ! print " \n"; } #print " \n"; } --- 233,252 ---- print "
                  Edit components of ...DescriptionBugsEdit
                  $product$description$bugsEdit
                  \n"; print " \n"; print " \n"; ! if ($doissuecounts) { ! print " \n"; } #print " \n"; print ""; while ( MoreSQLData() ) { ! my ($product, $description, $issues) = FetchSQLData(); $description ||= "missing"; print "\n"; print " \n"; print " \n"; ! if ($doissuecounts) { ! $issues ||= "none"; ! print " \n"; } #print " \n"; } *************** *** 266,275 **** PutHeader("Select component of $product"); CheckProduct($product); ! if ($dobugcounts) { ! SendSQL("SELECT value,description,initialowner,initialqacontact,COUNT(bug_id) ! FROM components LEFT JOIN bugs ! ON components.program=bugs.product AND components.value=bugs.component WHERE program=" . SqlQuote($product) . " GROUP BY value"); } else { --- 266,275 ---- PutHeader("Select component of $product"); CheckProduct($product); ! if ($doissuecounts) { ! SendSQL("SELECT value,description,initialowner,initialqacontact,COUNT(issue_id) ! FROM components LEFT JOIN issues ! ON components.program=issues.product AND components.value=issues.component WHERE program=" . SqlQuote($product) . " GROUP BY value"); } else { *************** *** 284,295 **** print " \n"; print " \n" if Param('useqacontact'); ! print " \n" ! if $dobugcounts; print " \n"; print ""; while ( MoreSQLData() ) { ! my ($component,$desc,$initialowner,$initialqacontact, $bugs) = FetchSQLData(); $desc ||= "missing"; $initialowner ||= "missing"; $initialqacontact ||= "none"; --- 284,295 ---- print " \n"; print " \n" if Param('useqacontact'); ! print " \n" ! if $doissuecounts; print " \n"; print ""; while ( MoreSQLData() ) { ! my ($component,$desc,$initialowner,$initialqacontact, $issues) = FetchSQLData(); $desc ||= "missing"; $initialowner ||= "missing"; $initialqacontact ||= "none"; *************** *** 299,307 **** print " \n"; print " \n" if Param('useqacontact'); ! if ($dobugcounts) { ! $bugs ||= 'none'; ! print " \n"; } print " \n"; print ""; --- 299,307 ---- print " \n"; print " \n" if Param('useqacontact'); ! if ($doissuecounts) { ! $issues ||= 'none'; ! print " \n"; } print " \n"; print ""; *************** *** 309,315 **** print "\n"; my $span = 3; $span++ if Param('useqacontact'); ! $span++ if $dobugcounts; print " \n"; print " \n"; print "
                  Edit components of ...DescriptionIssuesEdit
                  $product$description$issuesEditInitial ownerInitial QA contactBugsDelete
                  Initial ownerInitial QA contactIssuesDelete
                  $initialowner$initialqacontact$bugsDelete
                  $initialowner$initialqacontact$issuesDelete
                  Add a new componentAdd
                  \n"; --- 309,315 ---- print "\n"; my $span = 3; $span++ if Param('useqacontact'); ! $span++ if $doissuecounts; print " Add a new component\n"; print " Add\n"; print "\n"; *************** *** 319,326 **** } ! $dobugcounts = 1; # Stupid hack to force further PutTrailer() ! # calls to not offer a "bug count" option. # --- 319,326 ---- } ! $doissuecounts = 1; # Stupid hack to force further PutTrailer() ! # calls to not offer a "issue count" option. # *************** *** 333,339 **** PutHeader("Add component of $product"); CheckProduct($product); ! #print "This page lets you add a new product to bugzilla.\n"; print "\n"; print "\n"; --- 333,339 ---- PutHeader("Add component of $product"); CheckProduct($product); ! #print "This page lets you add a new product to issuezilla.\n"; print "\n"; print "
                  \n"; *************** *** 488,495 **** print " \n"; print " "; } ! SendSQL("SELECT count(bug_id) ! FROM bugs WHERE product=" . SqlQuote($product) . " AND component=" . SqlQuote($component)); --- 488,495 ---- print " \n"; print " "; } ! SendSQL("SELECT count(issue_id) ! FROM issues WHERE product=" . SqlQuote($product) . " AND component=" . SqlQuote($component)); *************** *** 508,539 **** } print "\n"; ! print " \n"; print " \n"; print "\n"; ! print " \n"; print " \n
                  Initial QA contact:$initialqacontactInitial QA contact:$initialqacontact
                  Closed for bugs:$disallownew
                  Bugs"; ! my $bugs = FetchOneColumn(); ! print $bugs || 'none'; print "
                  "; print "

                  Confirmation

                  \n"; ! if ($bugs) { ! if (!Param("allowbugdeletion")) { ! print "Sorry, there are $bugs bugs outstanding for this component. ! You must reassign those bugs to another component before you can delete this one."; PutTrailer($localtrailer); exit; } print "
                  \n", ! "There are bugs entered for this component! When you delete this ", ! "component, all stored bugs will be deleted, too. ", ! "You could not even see the bug history for this component anymore!\n", "
                  \n"; } --- 508,539 ---- } print "\n"; ! print " Closed for issues:\n"; print " $disallownew\n"; print "\n"; ! print " Issues\n"; print " "; ! my $issues = FetchOneColumn(); ! print $issues || 'none'; print "\n"; print "

                  Confirmation

                  \n"; ! if ($issues) { ! if (!Param("allowissuedeletion")) { ! print "Sorry, there are $issues issues outstanding for this component. ! You must reassign those issues to another component before you can delete this one."; PutTrailer($localtrailer); exit; } print "
                  \n", ! "There are issues entered for this component! When you delete this ", ! "component, all stored issues will be deleted, too. ", ! "You could not even see the issue history for this component anymore!\n", "
                  \n"; } *************** *** 565,606 **** # lock the tables before we start to change everything: SendSQL("LOCK TABLES attachments WRITE, ! bugs WRITE, ! bugs_activity WRITE, components WRITE, dependencies WRITE"); # According to MySQL doc I cannot do a DELETE x.* FROM x JOIN Y, ! # so I have to iterate over bugs and delete all the indivial entries ! # in bugs_activies and attachments. ! if (Param("allowbugdeletion")) { ! SendSQL("SELECT bug_id ! FROM bugs WHERE product=" . SqlQuote($product) . " AND component=" . SqlQuote($component)); while (MoreSQLData()) { ! my $bugid = FetchOneColumn(); my $query = ! $::db->query("DELETE FROM attachments WHERE bug_id=$bugid") or die "$::db_errstr"; $query = ! $::db->query("DELETE FROM bugs_activity WHERE bug_id=$bugid") or die "$::db_errstr"; $query = ! $::db->query("DELETE FROM dependencies WHERE blocked=$bugid") or die "$::db_errstr"; } ! print "Attachments, bug activity and dependencies deleted.
                  \n"; # Deleting the rest is easier: ! SendSQL("DELETE FROM bugs WHERE product=" . SqlQuote($product) . " AND component=" . SqlQuote($component)); ! print "Bugs deleted.
                  \n"; } SendSQL("DELETE FROM components --- 565,606 ---- # lock the tables before we start to change everything: SendSQL("LOCK TABLES attachments WRITE, ! issues WRITE, ! issues_activity WRITE, components WRITE, dependencies WRITE"); # According to MySQL doc I cannot do a DELETE x.* FROM x JOIN Y, ! # so I have to iterate over issues and delete all the indivial entries ! # in issues_activies and attachments. ! if (Param("allowissuedeletion")) { ! SendSQL("SELECT issue_id ! FROM issues WHERE product=" . SqlQuote($product) . " AND component=" . SqlQuote($component)); while (MoreSQLData()) { ! my $issueid = FetchOneColumn(); my $query = ! $::db->query("DELETE FROM attachments WHERE issue_id=$issueid") or die "$::db_errstr"; $query = ! $::db->query("DELETE FROM issues_activity WHERE issue_id=$issueid") or die "$::db_errstr"; $query = ! $::db->query("DELETE FROM dependencies WHERE blocked=$issueid") or die "$::db_errstr"; } ! print "Attachments, issue activity and dependencies deleted.
                  \n"; # Deleting the rest is easier: ! SendSQL("DELETE FROM issues WHERE product=" . SqlQuote($product) . " AND component=" . SqlQuote($component)); ! print "Issues deleted.
                  \n"; } SendSQL("DELETE FROM components *************** *** 647,661 **** EmitFormElements($product, $component, $initialowner, $initialqacontact, $cdesc); print "\n"; ! print " Bugs:\n"; print " "; SendSQL("SELECT count(*) ! FROM bugs WHERE product=" . SqlQuote($product) . " and component=" . SqlQuote($component)); ! my $bugs = ''; ! $bugs = FetchOneColumn() if MoreSQLData(); ! print $bugs || 'none'; print "\n\n"; --- 647,661 ---- EmitFormElements($product, $component, $initialowner, $initialqacontact, $cdesc); print "\n"; ! print " Issues:\n"; print " "; SendSQL("SELECT count(*) ! FROM issues WHERE product=" . SqlQuote($product) . " and component=" . SqlQuote($component)); ! my $issues = ''; ! $issues = FetchOneColumn() if MoreSQLData(); ! print $issues || 'none'; print "\n\n"; *************** *** 700,706 **** # Note that the order of this tests is important. If you change # them, be sure to test for WHERE='$component' or WHERE='$componentold' ! SendSQL("LOCK TABLES bugs WRITE, components WRITE"); if ($description ne $descriptionold) { --- 700,706 ---- # Note that the order of this tests is important. If you change # them, be sure to test for WHERE='$component' or WHERE='$componentold' ! SendSQL("LOCK TABLES issues WRITE, components WRITE"); if ($description ne $descriptionold) { *************** *** 765,771 **** exit; } ! SendSQL("UPDATE bugs SET component=" . SqlQuote($component) . " WHERE component=" . SqlQuote($componentold) . " AND product=" . SqlQuote($product)); --- 765,771 ---- exit; } ! SendSQL("UPDATE issues SET component=" . SqlQuote($component) . " WHERE component=" . SqlQuote($componentold) . " AND product=" . SqlQuote($product)); Index: editgroups.cgi =================================================================== RCS file: /cvsroot/mozilla/webtools/bugzilla/editgroups.cgi,v retrieving revision 1.8 diff -c -r1.8 editgroups.cgi *** editgroups.cgi 2000/09/14 23:53:24 1.8 --- editgroups.cgi 2000/09/29 04:57:12 *************** *** 1,4 **** ! #!/usr/bonsaitools/bin/perl -w # -*- Mode: perl; indent-tabs-mode: nil -*- # # The contents of this file are subject to the Mozilla Public --- 1,4 ---- ! #!/usr/bin/perl -w # -*- Mode: perl; indent-tabs-mode: nil -*- # # The contents of this file are subject to the Mozilla Public *************** *** 11,17 **** # 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 --- 11,17 ---- # implied. See the License for the specific language governing # rights and limitations under the License. # ! # The Original Code is the Issuezilla Issue Tracking System. # # The Initial Developer of the Original Code is Netscape Communications # Corporation. Portions created by Netscape are *************** *** 69,75 **** sub PutTrailer (@) { ! my (@links) = ("Back to the Main Bugs Page", @_); my $count = $#links; my $num = 0; --- 69,75 ---- sub PutTrailer (@) { ! my (@links) = ("Back to the Main Issues Page", @_); my $count = $#links; my $num = 0; *************** *** 109,115 **** SendSQL("SELECT bit,name,description,userregexp " . "FROM groups " . ! "WHERE isbuggroup != 0 " . "ORDER BY bit"); while (MoreSQLData()) { --- 109,115 ---- SendSQL("SELECT bit,name,description,userregexp " . "FROM groups " . ! "WHERE isissuegroup != 0 " . "ORDER BY bit"); while (MoreSQLData()) { *************** *** 138,147 **** print "

                  "; print "Name is what is used with the UserInGroup() function in any customized cgi files you write that use a given group. It can also be used by ! people submitting bugs by email to limit a bug to a certain groupset. It may not contain any spaces.

                  "; ! print "Description is what will be shown in the bug reports to ! members of the group where they can choose whether the bug will be restricted to others in the same group.

                  "; print "User RegExp is optional, and if filled in, will automatically grant membership to this group to anyone creating a new account with an --- 138,147 ---- print "

                  "; print "Name is what is used with the UserInGroup() function in any customized cgi files you write that use a given group. It can also be used by ! people submitting issues by email to limit an issue to a certain groupset. It may not contain any spaces.

                  "; ! print "Description is what will be shown in the issue reports to ! members of the group where they can choose whether the issue will be restricted to others in the same group.

                  "; print "User RegExp is optional, and if filled in, will automatically grant membership to this group to anyone creating a new account with an *************** *** 159,165 **** SendSQL("SELECT bit,name,description " . "FROM groups " . ! "WHERE isbuggroup = 0 " . "ORDER BY bit"); while (MoreSQLData()) { --- 159,165 ---- SendSQL("SELECT bit,name,description " . "FROM groups " . ! "WHERE isissuegroup = 0 " . "ORDER BY bit"); while (MoreSQLData()) { *************** *** 203,212 **** print "

                  "; print "Name is what is used with the UserInGroup() function in any customized cgi files you write that use a given group. It can also be used by ! people submitting bugs by email to limit a bug to a certain groupset. It may not contain any spaces.

                  "; ! print "Description is what will be shown in the bug reports to ! members of the group where they can choose whether the bug will be restricted to others in the same group.

                  "; print "User RegExp is optional, and if filled in, will automatically grant membership to this group to anyone creating a new account with an --- 203,212 ---- print "

                  "; print "Name is what is used with the UserInGroup() function in any customized cgi files you write that use a given group. It can also be used by ! people submitting issues by email to limit an issue to a certain groupset. It may not contain any spaces.

                  "; ! print "Description is what will be shown in the issue reports to ! members of the group where they can choose whether the issue will be restricted to others in the same group.

                  "; print "User RegExp is optional, and if filled in, will automatically grant membership to this group to anyone creating a new account with an *************** *** 294,300 **** # Add the new group SendSQL("INSERT INTO groups ( " . ! "bit, name, description, isbuggroup, userregexp" . " ) VALUES ( " . $bit . "," . SqlQuote($name) . "," . --- 294,300 ---- # Add the new group SendSQL("INSERT INTO groups ( " . ! "bit, name, description, isissuegroup, userregexp" . " ) VALUES ( " . $bit . "," . SqlQuote($name) . "," . *************** *** 363,384 **** this group for me

                  "; } ! SendSQL("SELECT bug_id FROM bugs WHERE (groupset & $bit)"); if (MoreSQLData()) { $cantdelete = 1; ! my $buglist = "0"; while (MoreSQLData()) { ! my ($bug) = FetchSQLData(); ! $buglist .= "," . $bug; } print " ! One or more bug reports are visible only to this group. ! You cannot delete this group while any bugs are using it.
                  ! Show me which bugs. - ! Remove all bugs from this group restriction for me
                  ! NOTE: It's quite possible to make confidential bugs public by checking ! this box. It is strongly suggested that you review the bugs in this group before checking the box.

                  "; } --- 363,384 ---- this group for me

                  "; } ! SendSQL("SELECT issue_id FROM issues WHERE (groupset & $bit)"); if (MoreSQLData()) { $cantdelete = 1; ! my $issuelist = "0"; while (MoreSQLData()) { ! my ($issue) = FetchSQLData(); ! $issuelist .= "," . $issue; } print " ! One or more issue reports are visible only to this group. ! You cannot delete this group while any issues are using it.
                  ! Show me which issues. - ! Remove all issues from this group restriction for me
                  ! NOTE: It's quite possible to make confidential issues public by checking ! this box. It is strongly suggested that you review the issues in this group before checking the box.

                  "; } *************** *** 443,451 **** $cantdelete = 1; } } ! SendSQL("SELECT bug_id FROM bugs WHERE (groupset & $bit)=$bit"); if (FetchOneColumn()) { ! if (!defined $::FORM{'removebugs'}) { $cantdelete = 1; } } --- 443,451 ---- $cantdelete = 1; } } ! SendSQL("SELECT issue_id FROM issues WHERE (groupset & $bit)=$bit"); if (FetchOneColumn()) { ! if (!defined $::FORM{'removeissues'}) { $cantdelete = 1; } } *************** *** 478,489 **** print "All users with authority to add users to group $bit have " . "had that authority removed.
                  "; } ! SendSQL("SELECT bug_id FROM bugs WHERE (groupset & $bit)"); if (FetchOneColumn()) { ! SendSQL("UPDATE bugs SET groupset=(groupset-$bit) " . "WHERE (groupset & $bit)"); ! print "All bugs have had group bit $bit cleared. Any of these " . ! "bugs that were not also in another group are now " . "publicly visible.
                  "; } SendSQL("DELETE FROM groups WHERE bit=$bit"); --- 478,489 ---- print "All users with authority to add users to group $bit have " . "had that authority removed.
                  "; } ! SendSQL("SELECT issue_id FROM issues WHERE (groupset & $bit)"); if (FetchOneColumn()) { ! SendSQL("UPDATE issues SET groupset=(groupset-$bit) " . "WHERE (groupset & $bit)"); ! print "All issues have had group bit $bit cleared. Any of these " . ! "issues that were not also in another group are now " . "publicly visible.
                  "; } SendSQL("DELETE FROM groups WHERE bit=$bit"); Index: editkeywords.cgi =================================================================== RCS file: /cvsroot/mozilla/webtools/bugzilla/editkeywords.cgi,v retrieving revision 1.6 diff -c -r1.6 editkeywords.cgi *** editkeywords.cgi 2000/07/25 22:09:20 1.6 --- editkeywords.cgi 2000/09/29 04:57:12 *************** *** 1,4 **** ! #!/usr/bonsaitools/bin/perl -w # -*- Mode: perl; indent-tabs-mode: nil -*- # # The contents of this file are subject to the Mozilla Public --- 1,4 ---- ! #!/usr/bin/perl -w # -*- Mode: perl; indent-tabs-mode: nil -*- # # The contents of this file are subject to the Mozilla Public *************** *** 11,17 **** # 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 Terry Weissman. # Portions created by Terry Weissman are --- 11,17 ---- # implied. See the License for the specific language governing # rights and limitations under the License. # ! # The Original Code is the Issuezilla Issue Tracking System. # # The Initial Developer of the Original Code is Terry Weissman. # Portions created by Terry Weissman are *************** *** 130,136 **** Edit keyword ... Description ! Bugs Action }; --- 130,136 ---- Edit keyword ... Description ! Issues Action }; *************** *** 139,159 **** my $max_table_size = 50; SendSQL("SELECT keyworddefs.id, keyworddefs.name, keyworddefs.description, ! COUNT(keywords.bug_id), keywords.bug_id FROM keyworddefs LEFT JOIN keywords ON keyworddefs.id = keywords.keywordid GROUP BY keyworddefs.id ORDER BY keyworddefs.name"); while (MoreSQLData()) { ! my ($id, $name, $description, $bugs, $onebug) = FetchSQLData(); $description ||= "missing"; ! $bugs ||= 'none'; ! if (!$onebug) { # This is silly hackery for old versions of MySQL that seem to # return a count() of 1 even if there are no matching. So, we ! # ask for an actual bug number. If it can't find any bugs that # match the keyword, then we set the count to be zero, ignoring # what it had responded. ! $bugs = 'none'; } if ($line_count == $max_table_size) { print "\n$tableheader"; --- 139,159 ---- my $max_table_size = 50; SendSQL("SELECT keyworddefs.id, keyworddefs.name, keyworddefs.description, ! COUNT(keywords.issue_id), keywords.issue_id FROM keyworddefs LEFT JOIN keywords ON keyworddefs.id = keywords.keywordid GROUP BY keyworddefs.id ORDER BY keyworddefs.name"); while (MoreSQLData()) { ! my ($id, $name, $description, $issues, $oneissue) = FetchSQLData(); $description ||= "missing"; ! $issues ||= 'none'; ! if (!$oneissue) { # This is silly hackery for old versions of MySQL that seem to # return a count() of 1 even if there are no matching. So, we ! # ask for an actual issue number. If it can't find any issues that # match the keyword, then we set the count to be zero, ignoring # what it had responded. ! $issues = 'none'; } if ($line_count == $max_table_size) { print "\n$tableheader"; *************** *** 165,171 **** $name $description ! $bugs Delete }; --- 165,171 ---- $name $description ! $issues Delete }; *************** *** 281,294 **** EmitFormElements($id, $name, $description); print "\n"; ! print " Bugs:\n"; print " "; SendSQL("SELECT count(*) FROM keywords WHERE keywordid = $id"); ! my $bugs = ''; ! $bugs = FetchOneColumn() if MoreSQLData(); ! print $bugs || 'none'; print "\n\n"; --- 281,294 ---- EmitFormElements($id, $name, $description); print "\n"; ! print " Issues:\n"; print " "; SendSQL("SELECT count(*) FROM keywords WHERE keywordid = $id"); ! my $issues = ''; ! $issues = FetchOneColumn() if MoreSQLData(); ! print $issues || 'none'; print "\n\n"; *************** *** 355,367 **** FROM keywords WHERE keywordid = $id"); ! my $bugs = FetchOneColumn(); ! if ($bugs) { print qq{ ! There are $bugs bugs which have this keyword set. Are you sure you want to delete the $name keyword? --- 355,367 ---- FROM keywords WHERE keywordid = $id"); ! my $issues = FetchOneColumn(); ! if ($issues) { print qq{ ! There are $issues issues which have this keyword set. Are you sure you want to delete the $name keyword? Index: editmilestones.cgi =================================================================== RCS file: /cvsroot/mozilla/webtools/bugzilla/editmilestones.cgi,v retrieving revision 1.3 diff -c -r1.3 editmilestones.cgi *** editmilestones.cgi 2000/08/30 23:44:36 1.3 --- editmilestones.cgi 2000/09/29 04:57:12 *************** *** 1,4 **** ! #!/usr/bonsaitools/bin/perl -w # -*- Mode: perl; indent-tabs-mode: nil -*- # --- 1,4 ---- ! #!/usr/bin/perl -w # -*- Mode: perl; indent-tabs-mode: nil -*- # *************** *** 188,203 **** print "\n"; print " \n"; print " \n"; ! print " \n"; print ""; while ( MoreSQLData() ) { ! my ($product, $description, $bugs) = FetchSQLData(); $description ||= "missing"; ! $bugs ||= "none"; print "\n"; print " \n"; print " \n"; ! print " \n"; } print "
                  Edit milestones of ...DescriptionBugs
                  $product$description$bugs
                  \n"; --- 188,203 ---- print "\n"; print " \n"; print " \n"; ! print " \n"; print ""; while ( MoreSQLData() ) { ! my ($product, $description, $issues) = FetchSQLData(); $description ||= "missing"; ! $issues ||= "none"; print "\n"; print " \n"; print " \n"; ! print " \n"; } print "
                  Edit milestones of ...DescriptionIssues
                  $product$description$issues
                  \n"; *************** *** 222,237 **** print "\n"; print " \n"; ! #print " \n"; print " \n"; print " \n"; print ""; while ( MoreSQLData() ) { ! my ($milestone,$sortkey,$bugs) = FetchSQLData(); ! $bugs ||= 'none'; print "\n"; print " \n"; ! #print " \n"; print " \n"; print " \n"; print ""; --- 222,237 ---- print "
                  Edit milestone ...BugsSortkeyAction
                  $milestone$bugs$sortkeyDelete
                  \n"; print " \n"; ! #print " \n"; print " \n"; print " \n"; print ""; while ( MoreSQLData() ) { ! my ($milestone,$sortkey,$issues) = FetchSQLData(); ! $issues ||= 'none'; print "\n"; print " \n"; ! #print " \n"; print " \n"; print " \n"; print ""; *************** *** 258,264 **** PutHeader("Add milestone for $product"); CheckProduct($product); ! #print "This page lets you add a new milestone to a $::bugzilla_name tracked product.\n"; print "\n"; print "
                  Edit milestone ...IssuesSortkeyAction
                  $milestone$issues$sortkeyDelete
                  \n"; --- 258,264 ---- PutHeader("Add milestone for $product"); CheckProduct($product); ! #print "This page lets you add a new milestone to a $::issuezilla_name tracked product.\n"; print "\n"; print "
                  \n"; *************** *** 329,340 **** PutHeader("Delete milestone of $product"); CheckMilestone($product, $milestone); ! SendSQL("SELECT count(bug_id),product,target_milestone ! FROM bugs GROUP BY product,target_milestone HAVING product=" . SqlQuote($product) . " AND target_milestone=" . SqlQuote($milestone)); ! my $bugs = FetchOneColumn(); SendSQL("SELECT defaultmilestone FROM products " . "WHERE product=" . SqlQuote($product)); --- 329,340 ---- PutHeader("Delete milestone of $product"); CheckMilestone($product, $milestone); ! SendSQL("SELECT count(issue_id),product,target_milestone ! FROM issues GROUP BY product,target_milestone HAVING product=" . SqlQuote($product) . " AND target_milestone=" . SqlQuote($milestone)); ! my $issues = FetchOneColumn(); SendSQL("SELECT defaultmilestone FROM products " . "WHERE product=" . SqlQuote($product)); *************** *** 352,375 **** print " \n"; print " \n"; print "\n"; ! print " \n"; ! print " \n"; print "
                  Milestone:$milestone
                  Bugs:", $bugs || 'none' , "
                  \n"; print "

                  Confirmation

                  \n"; ! if ($bugs) { ! if (!Param("allowbugdeletion")) { ! print "Sorry, there are $bugs bugs outstanding for this milestone. ! You must reassign those bugs to another milestone before you can delete this one."; PutTrailer($localtrailer); exit; } print "
                  \n", ! "There are bugs entered for this milestone! When you delete this ", ! "milestone, all stored bugs will be deleted, too. ", ! "You could not even see the bug history for this milestone anymore!\n", "
                  \n"; } --- 352,375 ---- print " Milestone:\n"; print " $milestone\n"; print "\n"; ! print " Issues:\n"; ! print " ", $issues || 'none' , "\n"; print "\n"; print "

                  Confirmation

                  \n"; ! if ($issues) { ! if (!Param("allowissuedeletion")) { ! print "Sorry, there are $issues issues outstanding for this milestone. ! You must reassign those issues to another milestone before you can delete this one."; PutTrailer($localtrailer); exit; } print "
                  \n", ! "There are issues entered for this milestone! When you delete this ", ! "milestone, all stored issues will be deleted, too. ", ! "You could not even see the issue history for this milestone anymore!\n", "
                  \n"; } *************** *** 407,449 **** # lock the tables before we start to change everything: SendSQL("LOCK TABLES attachments WRITE, ! bugs WRITE, ! bugs_activity WRITE, milestones WRITE, dependencies WRITE"); # According to MySQL doc I cannot do a DELETE x.* FROM x JOIN Y, ! # so I have to iterate over bugs and delete all the indivial entries ! # in bugs_activies and attachments. ! if (Param("allowbugdeletion")) { ! SendSQL("SELECT bug_id ! FROM bugs WHERE product=" . SqlQuote($product) . " AND target_milestone=" . SqlQuote($milestone)); while (MoreSQLData()) { ! my $bugid = FetchOneColumn(); my $query = ! $::db->query("DELETE FROM attachments WHERE bug_id=$bugid") or die "$::db_errstr"; $query = ! $::db->query("DELETE FROM bugs_activity WHERE bug_id=$bugid") or die "$::db_errstr"; $query = ! $::db->query("DELETE FROM dependencies WHERE blocked=$bugid") or die "$::db_errstr"; } ! print "Attachments, bug activity and dependencies deleted.
                  \n"; # Deleting the rest is easier: ! SendSQL("DELETE FROM bugs WHERE product=" . SqlQuote($product) . " AND target_milestone=" . SqlQuote($milestone)); ! print "Bugs deleted.
                  \n"; } SendSQL("DELETE FROM milestones --- 407,449 ---- # lock the tables before we start to change everything: SendSQL("LOCK TABLES attachments WRITE, ! issues WRITE, ! issues_activity WRITE, milestones WRITE, dependencies WRITE"); # According to MySQL doc I cannot do a DELETE x.* FROM x JOIN Y, ! # so I have to iterate over issues and delete all the indivial entries ! # in issues_activies and attachments. ! if (Param("allowissuedeletion")) { ! SendSQL("SELECT issue_id ! FROM issues WHERE product=" . SqlQuote($product) . " AND target_milestone=" . SqlQuote($milestone)); while (MoreSQLData()) { ! my $issueid = FetchOneColumn(); my $query = ! $::db->query("DELETE FROM attachments WHERE issue_id=$issueid") or die "$::db_errstr"; $query = ! $::db->query("DELETE FROM issues_activity WHERE issue_id=$issueid") or die "$::db_errstr"; $query = ! $::db->query("DELETE FROM dependencies WHERE blocked=$issueid") or die "$::db_errstr"; } ! print "Attachments, issue activity and dependencies deleted.
                  \n"; # Deleting the rest is easier: ! SendSQL("DELETE FROM issues WHERE product=" . SqlQuote($product) . " AND target_milestone=" . SqlQuote($milestone)); ! print "Issues deleted.
                  \n"; } SendSQL("DELETE FROM milestones *************** *** 509,515 **** CheckMilestone($product,$milestoneold); ! SendSQL("LOCK TABLES bugs WRITE, milestones WRITE, products WRITE"); --- 509,515 ---- CheckMilestone($product,$milestoneold); ! SendSQL("LOCK TABLES issues WRITE, milestones WRITE, products WRITE"); *************** *** 526,532 **** SendSQL("UNLOCK TABLES"); exit; } ! SendSQL("UPDATE bugs SET target_milestone=" . SqlQuote($milestone) . " WHERE target_milestone=" . SqlQuote($milestoneold) . " AND product=" . SqlQuote($product)); --- 526,532 ---- SendSQL("UNLOCK TABLES"); exit; } ! SendSQL("UPDATE issues SET target_milestone=" . SqlQuote($milestone) . " WHERE target_milestone=" . SqlQuote($milestoneold) . " AND product=" . SqlQuote($product)); Index: editparams.cgi =================================================================== RCS file: /cvsroot/mozilla/webtools/bugzilla/editparams.cgi,v retrieving revision 1.11 diff -c -r1.11 editparams.cgi *** editparams.cgi 2000/01/14 22:35:34 1.11 --- editparams.cgi 2000/09/29 04:57:12 *************** *** 1,4 **** ! #!/usr/bonsaitools/bin/perl -w # -*- Mode: perl; indent-tabs-mode: nil -*- # # The contents of this file are subject to the Mozilla Public --- 1,4 ---- ! #!/usr/bin/perl -w # -*- Mode: perl; indent-tabs-mode: nil -*- # # The contents of this file are subject to the Mozilla Public *************** *** 11,17 **** # 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 --- 11,17 ---- # implied. See the License for the specific language governing # rights and limitations under the License. # ! # The Original Code is the Issuezilla Issue Tracking System. # # The Initial Developer of the Original Code is Netscape Communications # Corporation. Portions created by Netscape are *************** *** 46,52 **** PutHeader("Edit parameters", undef, undef, undef, 1); ! print "This lets you edit the basic operating parameters of bugzilla.\n"; print "Be careful!\n"; print "

                  \n"; print "Any item you check Reset on will get reset to its default value.\n"; --- 46,52 ---- PutHeader("Edit parameters", undef, undef, undef, 1); ! print "This lets you edit the basic operating parameters of issuezilla.\n"; print "Be careful!\n"; print "

                  \n"; print "Any item you check Reset on will get reset to its default value.\n"; *************** *** 93,99 **** } print "version: ! What version of Bugzilla this is. This can't be modified here, but %version% can be used as a parameter in places that understand such parameters " . Param('version') . ""; --- 93,99 ---- } print "version: ! What version of Issuezilla this is. This can't be modified here, but %version% can be used as a parameter in places that understand such parameters " . Param('version') . ""; Index: editproducts.cgi =================================================================== RCS file: /cvsroot/mozilla/webtools/bugzilla/editproducts.cgi,v retrieving revision 1.17 diff -c -r1.17 editproducts.cgi *** editproducts.cgi 2000/08/31 22:56:21 1.17 --- editproducts.cgi 2000/09/29 04:57:12 *************** *** 1,4 **** ! #!/usr/bonsaitools/bin/perl -w # -*- Mode: perl; indent-tabs-mode: nil -*- # # The contents of this file are subject to the Mozilla Public --- 1,4 ---- ! #!/usr/bin/perl -w # -*- Mode: perl; indent-tabs-mode: nil -*- # # The contents of this file are subject to the Mozilla Public *************** *** 82,88 **** sub EmitFormElements ($$$$$$$$$) { my ($product, $description, $milestoneurl, $userregexp, $disallownew, ! $votesperuser, $maxvotesperbug, $votestoconfirm, $defaultmilestone) = @_; $product = value_quote($product); --- 82,88 ---- sub EmitFormElements ($$$$$$$$$) { my ($product, $description, $milestoneurl, $userregexp, $disallownew, ! $votesperuser, $maxvotesperissue, $votestoconfirm, $defaultmilestone) = @_; $product = value_quote($product); *************** *** 111,125 **** } # Added -JMR, 2/16/00 ! if (Param("usebuggroups")) { $userregexp = value_quote($userregexp); print "\n"; ! print " User Regexp for Bug Group:\n"; print " \n"; } print "\n"; ! print " Closed for bug entry:\n"; my $closed = $disallownew ? "CHECKED" : ""; print " \n"; --- 111,125 ---- } # Added -JMR, 2/16/00 ! if (Param("useissuegroups")) { $userregexp = value_quote($userregexp); print "\n"; ! print " User Regexp for Issue Group:\n"; print " \n"; } print "\n"; ! print " Closed for issue entry:\n"; my $closed = $disallownew ? "CHECKED" : ""; print " \n"; *************** *** 128,138 **** print " \n"; print "\n"; ! print " Maximum votes a person can put on a single bug:\n"; ! print " \n"; print "\n"; ! print " Number of votes a bug in this product needs to automatically get out of the UNCONFIRMED state:\n"; print " \n"; } --- 128,138 ---- print " \n"; print "\n"; ! print " Maximum votes a person can put on a single issue:\n"; ! print " \n"; print "\n"; ! print " Number of votes an issue in this product needs to automatically get out of the UNCONFIRMED state:\n"; print " \n"; } *************** *** 205,213 **** PutHeader("Select product"); SendSQL("SELECT products.product,description,disallownew, ! votesperuser,maxvotesperbug,votestoconfirm,COUNT(bug_id) ! FROM products LEFT JOIN bugs ! ON products.product=bugs.product GROUP BY products.product ORDER BY products.product"); print "\n"; --- 205,213 ---- PutHeader("Select product"); SendSQL("SELECT products.product,description,disallownew, ! votesperuser,maxvotesperissue,votestoconfirm,COUNT(issue_id) ! FROM products LEFT JOIN issues ! ON products.product=issues.product GROUP BY products.product ORDER BY products.product"); print "
                  \n"; *************** *** 215,239 **** print " \n"; print " \n"; print " \n"; ! print " \n"; print " \n"; ! print " \n"; print " \n"; print ""; while ( MoreSQLData() ) { my ($product, $description, $disallownew, $votesperuser, ! $maxvotesperbug, $votestoconfirm, $bugs) = FetchSQLData(); $description ||= "missing"; $disallownew = $disallownew ? 'closed' : 'open'; ! $bugs ||= 'none'; print "\n"; print " \n"; print " \n"; print " \n"; print " \n"; ! print " \n"; print " \n"; ! print " \n"; print " \n"; print ""; } --- 215,239 ---- print " \n"; print " \n"; print " \n"; ! print " \n"; print " \n"; ! print " \n"; print " \n"; print ""; while ( MoreSQLData() ) { my ($product, $description, $disallownew, $votesperuser, ! $maxvotesperissue, $votestoconfirm, $issues) = FetchSQLData(); $description ||= "missing"; $disallownew = $disallownew ? 'closed' : 'open'; ! $issues ||= 'none'; print "\n"; print " \n"; print " \n"; print " \n"; print " \n"; ! print " \n"; print " \n"; ! print " \n"; print " \n"; print ""; } *************** *** 258,264 **** if ($action eq 'add') { PutHeader("Add product"); ! #print "This page lets you add a new product to bugzilla.\n"; print "\n"; print "
                  DescriptionStatusVotes
                  per
                  user
                  Max
                  Votes
                  per
                  bug
                  Votes
                  to
                  confirm
                  BugsAction
                  $product$description$disallownew$votesperuser$maxvotesperbug$votestoconfirm$bugsDelete
                  DescriptionStatusVotes
                  per
                  user
                  Max
                  Votes
                  per
                  issue
                  Votes
                  to
                  confirm
                  IssuesAction
                  $product$description$disallownew$votesperuser$maxvotesperissue$votestoconfirm$issuesDelete
                  \n"; --- 258,264 ---- if ($action eq 'add') { PutHeader("Add product"); ! #print "This page lets you add a new product to issuezilla.\n"; print "\n"; print "
                  \n"; *************** *** 320,327 **** $disallownew = 1 if $::FORM{disallownew}; my $votesperuser = $::FORM{votesperuser}; $votesperuser ||= 0; ! my $maxvotesperbug = $::FORM{maxvotesperbug}; ! $maxvotesperbug = 10000 if !defined $maxvotesperbug; my $votestoconfirm = $::FORM{votestoconfirm}; $votestoconfirm ||= 0; my $defaultmilestone = $::FORM{defaultmilestone} || "---"; --- 320,327 ---- $disallownew = 1 if $::FORM{disallownew}; my $votesperuser = $::FORM{votesperuser}; $votesperuser ||= 0; ! my $maxvotesperissue = $::FORM{maxvotesperissue}; ! $maxvotesperissue = 10000 if !defined $maxvotesperissue; my $votestoconfirm = $::FORM{votestoconfirm}; $votestoconfirm ||= 0; my $defaultmilestone = $::FORM{defaultmilestone} || "---"; *************** *** 329,341 **** # Add the new product. SendSQL("INSERT INTO products ( " . "product, description, milestoneurl, disallownew, votesperuser, " . ! "maxvotesperbug, votestoconfirm, defaultmilestone" . " ) VALUES ( " . SqlQuote($product) . "," . SqlQuote($description) . "," . SqlQuote($milestoneurl) . "," . $disallownew . "," . ! "$votesperuser, $maxvotesperbug, $votestoconfirm, " . SqlQuote($defaultmilestone) . ")"); SendSQL("INSERT INTO versions ( " . "value, program" . --- 329,341 ---- # Add the new product. SendSQL("INSERT INTO products ( " . "product, description, milestoneurl, disallownew, votesperuser, " . ! "maxvotesperissue, votestoconfirm, defaultmilestone" . " ) VALUES ( " . SqlQuote($product) . "," . SqlQuote($description) . "," . SqlQuote($milestoneurl) . "," . $disallownew . "," . ! "$votesperuser, $maxvotesperissue, $votestoconfirm, " . SqlQuote($defaultmilestone) . ")"); SendSQL("INSERT INTO versions ( " . "value, program" . *************** *** 346,357 **** SendSQL("INSERT INTO milestones (product, value) VALUES (" . SqlQuote($product) . ", " . SqlQuote($defaultmilestone) . ")"); ! # If we're using bug groups, then we need to create a group for this # product as well. -JMR, 2/16/00 ! if(Param("usebuggroups")) { # First we need to figure out the bit for this group. We'll simply # use the next highest bit available. We'll use a minimum bit of 256, ! # to leave room for a few more Bugzilla operation groups at the bottom. SendSQL("SELECT MAX(bit) FROM groups"); my $bit = FetchOneColumn(); if($bit < 256) { --- 346,357 ---- SendSQL("INSERT INTO milestones (product, value) VALUES (" . SqlQuote($product) . ", " . SqlQuote($defaultmilestone) . ")"); ! # If we're using issue groups, then we need to create a group for this # product as well. -JMR, 2/16/00 ! if(Param("useissuegroups")) { # First we need to figure out the bit for this group. We'll simply # use the next highest bit available. We'll use a minimum bit of 256, ! # to leave room for a few more Issuezilla operation groups at the bottom. SendSQL("SELECT MAX(bit) FROM groups"); my $bit = FetchOneColumn(); if($bit < 256) { *************** *** 362,372 **** # Next we insert into the groups table SendSQL("INSERT INTO groups " . ! "(bit, name, description, isbuggroup, userregexp) " . "VALUES (" . $bit . ", " . SqlQuote($product) . ", " . ! SqlQuote($product . " Bugs Access") . ", " . "1, " . SqlQuote($userregexp) . ")"); --- 362,372 ---- # Next we insert into the groups table SendSQL("INSERT INTO groups " . ! "(bit, name, description, isissuegroup, userregexp) " . "VALUES (" . $bit . ", " . SqlQuote($product) . ", " . ! SqlQuote($product . " Issues Access") . ", " . "1, " . SqlQuote($userregexp) . ")"); *************** *** 381,387 **** # Modified, 7/17/00, Joe Robins # If the userregexp is left empty, then no users should be added to ! # the bug group. As is, it was adding all users, since they all # matched the empty pattern. # In addition, I've replaced the rigamarole I was going through to # find matching users with a much simpler statement that lets the --- 381,387 ---- # Modified, 7/17/00, Joe Robins # If the userregexp is left empty, then no users should be added to ! # the issue group. As is, it was adding all users, since they all # matched the empty pattern. # In addition, I've replaced the rigamarole I was going through to # find matching users with a much simpler statement that lets the *************** *** 441,447 **** } # Added -JMR, 2/16/00 ! if(Param('usebuggroups')) { # Get the regexp for this product. SendSQL("SELECT userregexp FROM groups --- 441,447 ---- } # Added -JMR, 2/16/00 ! if(Param('useissuegroups')) { # Get the regexp for this product. SendSQL("SELECT userregexp FROM groups *************** *** 453,464 **** $userregexp = "blank"; } print "\n"; ! print " \n"; print " \n"; } print "\n"; ! print " \n"; print " \n"; print "\n"; --- 453,464 ---- $userregexp = "blank"; } print "\n"; ! print " \n"; print " \n"; } print "\n"; ! print " \n"; print " \n"; print "\n"; *************** *** 524,555 **** } print "\n\n"; ! print " \n"; print " \n
                  User Regexp for Bug Group:$userregexp
                  Closed for bugs:$disallownew
                  User Regexp for Issue Group:$userregexp
                  Closed for issues:$disallownew
                  Bugs:"; ! SendSQL("SELECT count(bug_id),product ! FROM bugs GROUP BY product HAVING product=" . SqlQuote($product)); ! my $bugs = FetchOneColumn(); ! print $bugs || 'none'; print "
                  "; print "

                  Confirmation

                  \n"; ! if ($bugs) { ! if (!Param("allowbugdeletion")) { ! print "Sorry, there are $bugs bugs outstanding for this product. ! You must reassign those bugs to another product before you can delete this one."; PutTrailer($localtrailer); exit; } print "
                  \n", ! "There are bugs entered for this product! When you delete this ", ! "product, all stored bugs will be deleted, too. ", ! "You could not even see a bug history anymore!\n", "
                  \n"; } --- 524,555 ---- } print "\n\n"; ! print " Issues:\n"; print " "; ! SendSQL("SELECT count(issue_id),product ! FROM issues GROUP BY product HAVING product=" . SqlQuote($product)); ! my $issues = FetchOneColumn(); ! print $issues || 'none'; print "\n"; print "

                  Confirmation

                  \n"; ! if ($issues) { ! if (!Param("allowissuedeletion")) { ! print "Sorry, there are $issues issues outstanding for this product. ! You must reassign those issues to another product before you can delete this one."; PutTrailer($localtrailer); exit; } print "
                  \n", ! "There are issues entered for this product! When you delete this ", ! "product, all stored issues will be deleted, too. ", ! "You could not even see an issue history anymore!\n", "
                  \n"; } *************** *** 578,585 **** # lock the tables before we start to change everything: SendSQL("LOCK TABLES attachments WRITE, ! bugs WRITE, ! bugs_activity WRITE, components WRITE, dependencies WRITE, versions WRITE, --- 578,585 ---- # lock the tables before we start to change everything: SendSQL("LOCK TABLES attachments WRITE, ! issues WRITE, ! issues_activity WRITE, components WRITE, dependencies WRITE, versions WRITE, *************** *** 589,622 **** milestones WRITE"); # According to MySQL doc I cannot do a DELETE x.* FROM x JOIN Y, ! # so I have to iterate over bugs and delete all the indivial entries ! # in bugs_activies and attachments. ! if (Param("allowbugdeletion")) { ! SendSQL("SELECT bug_id ! FROM bugs WHERE product=" . SqlQuote($product)); while (MoreSQLData()) { ! my $bugid = FetchOneColumn(); my $query = ! $::db->do("DELETE FROM attachments WHERE bug_id=$bugid") or die "$::db_errstr"; $query = ! $::db->do("DELETE FROM bugs_activity WHERE bug_id=$bugid") or die "$::db_errstr"; $query = ! $::db->do("DELETE FROM dependencies WHERE blocked=$bugid") or die "$::db_errstr"; } ! print "Attachments, bug activity and dependencies deleted.
                  \n"; # Deleting the rest is easier: ! SendSQL("DELETE FROM bugs WHERE product=" . SqlQuote($product)); ! print "Bugs deleted.
                  \n"; } SendSQL("DELETE FROM components --- 589,622 ---- milestones WRITE"); # According to MySQL doc I cannot do a DELETE x.* FROM x JOIN Y, ! # so I have to iterate over issues and delete all the indivial entries ! # in issues_activies and attachments. ! if (Param("allowissuedeletion")) { ! SendSQL("SELECT issue_id ! FROM issues WHERE product=" . SqlQuote($product)); while (MoreSQLData()) { ! my $issueid = FetchOneColumn(); my $query = ! $::db->do("DELETE FROM attachments WHERE issue_id=$issueid") or die "$::db_errstr"; $query = ! $::db->do("DELETE FROM issues_activity WHERE issue_id=$issueid") or die "$::db_errstr"; $query = ! $::db->do("DELETE FROM dependencies WHERE blocked=$issueid") or die "$::db_errstr"; } ! print "Attachments, issue activity and dependencies deleted.
                  \n"; # Deleting the rest is easier: ! SendSQL("DELETE FROM issues WHERE product=" . SqlQuote($product)); ! print "Issues deleted.
                  \n"; } SendSQL("DELETE FROM components *************** *** 637,643 **** print "Product '$product' deleted.
                  \n"; # Added -JMR, 2/16/00 ! if (Param("usebuggroups")) { # We need to get the bit of the group from the table, then update the # groupsets of members of that group and remove the group. SendSQL("SELECT bit, description FROM groups " . --- 637,643 ---- print "Product '$product' deleted.
                  \n"; # Added -JMR, 2/16/00 ! if (Param("useissuegroups")) { # We need to get the bit of the group from the table, then update the # groupsets of members of that group and remove the group. SendSQL("SELECT bit, description FROM groups " . *************** *** 682,696 **** # get data of product SendSQL("SELECT description,milestoneurl,disallownew, ! votesperuser,maxvotesperbug,votestoconfirm,defaultmilestone FROM products WHERE product=" . SqlQuote($product)); my ($description, $milestoneurl, $disallownew, ! $votesperuser, $maxvotesperbug, $votestoconfirm, $defaultmilestone) = FetchSQLData(); my $userregexp = ''; ! if(Param("usebuggroups")) { SendSQL("SELECT userregexp FROM groups WHERE name=" . SqlQuote($product)); --- 682,696 ---- # get data of product SendSQL("SELECT description,milestoneurl,disallownew, ! votesperuser,maxvotesperissue,votestoconfirm,defaultmilestone FROM products WHERE product=" . SqlQuote($product)); my ($description, $milestoneurl, $disallownew, ! $votesperuser, $maxvotesperissue, $votestoconfirm, $defaultmilestone) = FetchSQLData(); my $userregexp = ''; ! if(Param("useissuegroups")) { SendSQL("SELECT userregexp FROM groups WHERE name=" . SqlQuote($product)); *************** *** 701,707 **** print "\n"; EmitFormElements($product, $description, $milestoneurl, $userregexp, ! $disallownew, $votesperuser, $maxvotesperbug, $votestoconfirm, $defaultmilestone); print "\n"; --- 701,707 ---- print "
                  \n"; EmitFormElements($product, $description, $milestoneurl, $userregexp, ! $disallownew, $votesperuser, $maxvotesperissue, $votestoconfirm, $defaultmilestone); print "\n"; *************** *** 768,782 **** } print "\n\n"; ! print " \n"; print " \n
                  Bugs:"; ! SendSQL("SELECT count(bug_id),product ! FROM bugs GROUP BY product HAVING product=" . SqlQuote($product)); ! my $bugs = ''; ! $bugs = FetchOneColumn() if MoreSQLData(); ! print $bugs || 'none'; print "
                  \n"; --- 768,782 ---- } print "\n\n"; ! print " Issues:\n"; print " "; ! SendSQL("SELECT count(issue_id),product ! FROM issues GROUP BY product HAVING product=" . SqlQuote($product)); ! my $issues = ''; ! $issues = FetchOneColumn() if MoreSQLData(); ! print $issues || 'none'; print "\n\n"; *************** *** 786,798 **** value_quote($description) . "\">\n"; print "\n"; ! if(Param("usebuggroups")) { print "\n"; } print "\n"; print "\n"; ! print "\n"; print "\n"; $defaultmilestone = value_quote($defaultmilestone); print "\n"; --- 786,798 ---- value_quote($description) . "\">\n"; print "\n"; ! if(Param("useissuegroups")) { print "\n"; } print "\n"; print "\n"; ! print "\n"; print "\n"; $defaultmilestone = value_quote($defaultmilestone); print "\n"; *************** *** 827,834 **** my $votesperuserold = trim($::FORM{votesperuserold} || 0); my $userregexp = trim($::FORM{userregexp} || ''); my $userregexpold = trim($::FORM{userregexpold} || ''); ! my $maxvotesperbug = trim($::FORM{maxvotesperbug} || 0); ! my $maxvotesperbugold = trim($::FORM{maxvotesperbugold} || 0); my $votestoconfirm = trim($::FORM{votestoconfirm} || 0); my $votestoconfirmold = trim($::FORM{votestoconfirmold} || 0); my $defaultmilestone = trim($::FORM{defaultmilestone} || '---'); --- 827,834 ---- my $votesperuserold = trim($::FORM{votesperuserold} || 0); my $userregexp = trim($::FORM{userregexp} || ''); my $userregexpold = trim($::FORM{userregexpold} || ''); ! my $maxvotesperissue = trim($::FORM{maxvotesperissue} || 0); ! my $maxvotesperissueold = trim($::FORM{maxvotesperissueold} || 0); my $votestoconfirm = trim($::FORM{votestoconfirm} || 0); my $votestoconfirmold = trim($::FORM{votestoconfirmold} || 0); my $defaultmilestone = trim($::FORM{defaultmilestone} || '---'); *************** *** 838,845 **** CheckProduct($productold); ! if ($maxvotesperbug !~ /^\d+$/ || $maxvotesperbug <= 0) { ! print "Sorry, the max votes per bug must be a positive integer."; PutTrailer($localtrailer); exit; } --- 838,845 ---- CheckProduct($productold); ! if ($maxvotesperissue !~ /^\d+$/ || $maxvotesperissue <= 0) { ! print "Sorry, the max votes per issue must be a positive integer."; PutTrailer($localtrailer); exit; } *************** *** 847,853 **** # Note that the order of this tests is important. If you change # them, be sure to test for WHERE='$product' or WHERE='$productold' ! SendSQL("LOCK TABLES bugs WRITE, components WRITE, products WRITE, versions WRITE, --- 847,853 ---- # Note that the order of this tests is important. If you change # them, be sure to test for WHERE='$product' or WHERE='$productold' ! SendSQL("LOCK TABLES issues WRITE, components WRITE, products WRITE, versions WRITE, *************** *** 860,866 **** SendSQL("UPDATE products SET disallownew=$disallownew WHERE product=" . SqlQuote($productold)); ! print "Updated bug submit status.
                  \n"; } if ($description ne $descriptionold) { --- 860,866 ---- SendSQL("UPDATE products SET disallownew=$disallownew WHERE product=" . SqlQuote($productold)); ! print "Updated issue submit status.
                  \n"; } if ($description ne $descriptionold) { *************** *** 884,892 **** } # Added -JMR, 2/16/00 ! if (Param("usebuggroups") && $userregexp ne $userregexpold) { # This will take a little bit of work here, since there may not be ! # an existing bug group for this product, and we will also have to # update users groupsets. # First we find out if there's an existing group for this product, and # get its bit if there is. --- 884,892 ---- } # Added -JMR, 2/16/00 ! if (Param("useissuegroups") && $userregexp ne $userregexpold) { # This will take a little bit of work here, since there may not be ! # an existing issue group for this product, and we will also have to # update users groupsets. # First we find out if there's an existing group for this product, and # get its bit if there is. *************** *** 899,905 **** SendSQL("UPDATE groups " . "SET userregexp = " . SqlQuote($userregexp) . " " . "WHERE name = " . SqlQuote($productold)); ! print "Updated user regexp for bug group.
                  \n"; } else { # Group doesn't exist. Let's make it, the same way as we make a # group for a new product above. --- 899,905 ---- SendSQL("UPDATE groups " . "SET userregexp = " . SqlQuote($userregexp) . " " . "WHERE name = " . SqlQuote($productold)); ! print "Updated user regexp for issue group.
                  \n"; } else { # Group doesn't exist. Let's make it, the same way as we make a # group for a new product above. *************** *** 911,923 **** $bit = $tmp_bit * 2; } SendSQL("INSERT INTO groups " . ! "(bit, name, description, isbuggroup, userregexp) " . "values (" . $bit . ", " . SqlQuote($productold) . ", " . ! SqlQuote($productold . " Bugs Access") . ", " . "1, " . SqlQuote($userregexp) . ")"); ! print "Created bug group.
                  \n"; } # And now we have to update the profiles again to add any users who --- 911,923 ---- $bit = $tmp_bit * 2; } SendSQL("INSERT INTO groups " . ! "(bit, name, description, isissuegroup, userregexp) " . "values (" . $bit . ", " . SqlQuote($productold) . ", " . ! SqlQuote($productold . " Issues Access") . ", " . "1, " . SqlQuote($userregexp) . ")"); ! print "Created issue group.
                  \n"; } # And now we have to update the profiles again to add any users who *************** *** 955,965 **** } ! if ($maxvotesperbug ne $maxvotesperbugold) { SendSQL("UPDATE products ! SET maxvotesperbug=$maxvotesperbug WHERE product=" . SqlQuote($productold)); ! print "Updated max votes per bug.
                  \n"; $checkvotes = 1; } --- 955,965 ---- } ! if ($maxvotesperissue ne $maxvotesperissueold) { SendSQL("UPDATE products ! SET maxvotesperissue=$maxvotesperissue WHERE product=" . SqlQuote($productold)); ! print "Updated max votes per issue.
                  \n"; $checkvotes = 1; } *************** *** 1006,1023 **** exit; } ! SendSQL("UPDATE bugs SET product=$qp WHERE product=$qpold"); SendSQL("UPDATE components SET program=$qp WHERE program=$qpold"); SendSQL("UPDATE products SET product=$qp WHERE product=$qpold"); SendSQL("UPDATE versions SET program=$qp WHERE program=$qpold"); SendSQL("UPDATE milestones SET product=$qp WHERE product=$qpold"); # Need to do an update to groups as well. If there is a corresponding ! # bug group, whether usebuggroups is currently set or not, we want to # update it so it will match in the future. If there is no group, this # update statement will do nothing, so no harm done. -JMR, 3/8/00 SendSQL("UPDATE groups " . "SET name=$qp, " . ! "description=".SqlQuote($product." Bugs Access")." ". "WHERE name=$qpold"); print "Updated product name.
                  \n"; --- 1006,1023 ---- exit; } ! SendSQL("UPDATE issues SET product=$qp WHERE product=$qpold"); SendSQL("UPDATE components SET program=$qp WHERE program=$qpold"); SendSQL("UPDATE products SET product=$qp WHERE product=$qpold"); SendSQL("UPDATE versions SET program=$qp WHERE program=$qpold"); SendSQL("UPDATE milestones SET product=$qp WHERE product=$qpold"); # Need to do an update to groups as well. If there is a corresponding ! # issue group, whether useissuegroups is currently set or not, we want to # update it so it will match in the future. If there is no group, this # update statement will do nothing, so no harm done. -JMR, 3/8/00 SendSQL("UPDATE groups " . "SET name=$qp, " . ! "description=".SqlQuote($product." Issues Access")." ". "WHERE name=$qpold"); print "Updated product name.
                  \n"; *************** *** 1027,1038 **** if ($checkvotes) { print "Checking existing votes in this product for anybody who now has too many votes."; ! if ($maxvotesperbug < $votesperuser) { ! SendSQL("SELECT votes.who, votes.bug_id " . ! "FROM votes, bugs " . ! "WHERE bugs.bug_id = votes.bug_id " . ! " AND bugs.product = $qp " . ! " AND votes.count > $maxvotesperbug"); my @list; while (MoreSQLData()) { my ($who, $id) = (FetchSQLData()); --- 1027,1038 ---- if ($checkvotes) { print "Checking existing votes in this product for anybody who now has too many votes."; ! if ($maxvotesperissue < $votesperuser) { ! SendSQL("SELECT votes.who, votes.issue_id " . ! "FROM votes, issues " . ! "WHERE issues.issue_id = votes.issue_id " . ! " AND issues.product = $qp " . ! " AND votes.count > $maxvotesperissue"); my @list; while (MoreSQLData()) { my ($who, $id) = (FetchSQLData()); *************** *** 1040,1053 **** } foreach my $ref (@list) { my ($who, $id) = (@$ref); ! RemoveVotes($id, $who, "The rules for voting on this product has changed;\nyou had too many votes for a single bug."); my $name = DBID_to_name($who); ! print qq{
                  Removed votes for bug $id from $name\n}; } } ! SendSQL("SELECT votes.who, votes.count FROM votes, bugs " . ! "WHERE bugs.bug_id = votes.bug_id " . ! " AND bugs.product = $qp"); my %counts; while (MoreSQLData()) { my ($who, $count) = (FetchSQLData()); --- 1040,1053 ---- } foreach my $ref (@list) { my ($who, $id) = (@$ref); ! RemoveVotes($id, $who, "The rules for voting on this product has changed;\nyou had too many votes for a single issue."); my $name = DBID_to_name($who); ! print qq{
                  Removed votes for issue $id from $name\n}; } } ! SendSQL("SELECT votes.who, votes.count FROM votes, issues " . ! "WHERE issues.issue_id = votes.issue_id " . ! " AND issues.product = $qp"); my %counts; while (MoreSQLData()) { my ($who, $count) = (FetchSQLData()); *************** *** 1059,1087 **** } foreach my $who (keys(%counts)) { if ($counts{$who} > $votesperuser) { ! SendSQL("SELECT votes.bug_id FROM votes, bugs " . ! "WHERE bugs.bug_id = votes.bug_id " . ! " AND bugs.product = $qp " . " AND votes.who = $who"); while (MoreSQLData()) { my $id = FetchSQLData(); RemoveVotes($id, $who, "The rules for voting on this product has changed; you had too many\ntotal votes, so all votes have been removed."); my $name = DBID_to_name($who); ! print qq{
                  Removed votes for bug $id from $name\n}; } } } ! SendSQL("SELECT bug_id FROM bugs " . "WHERE product = $qp " . ! " AND bug_status = '$::unconfirmedstate' " . " AND votes >= $votestoconfirm"); my @list; while (MoreSQLData()) { push(@list, FetchOneColumn()); } foreach my $id (@list) { ! SendSQL("SELECT who FROM votes WHERE bug_id = $id"); my $who = FetchOneColumn(); CheckIfVotedConfirmed($id, $who); } --- 1059,1087 ---- } foreach my $who (keys(%counts)) { if ($counts{$who} > $votesperuser) { ! SendSQL("SELECT votes.issue_id FROM votes, issues " . ! "WHERE issues.issue_id = votes.issue_id " . ! " AND issues.product = $qp " . " AND votes.who = $who"); while (MoreSQLData()) { my $id = FetchSQLData(); RemoveVotes($id, $who, "The rules for voting on this product has changed; you had too many\ntotal votes, so all votes have been removed."); my $name = DBID_to_name($who); ! print qq{
                  Removed votes for issue $id from $name\n}; } } } ! SendSQL("SELECT issue_id FROM issues " . "WHERE product = $qp " . ! " AND issue_status = '$::unconfirmedstate' " . " AND votes >= $votestoconfirm"); my @list; while (MoreSQLData()) { push(@list, FetchOneColumn()); } foreach my $id (@list) { ! SendSQL("SELECT who FROM votes WHERE issue_id = $id"); my $who = FetchOneColumn(); CheckIfVotedConfirmed($id, $who); } Index: editusers.cgi =================================================================== RCS file: /cvsroot/mozilla/webtools/bugzilla/editusers.cgi,v retrieving revision 1.17 diff -c -r1.17 editusers.cgi *** editusers.cgi 2000/09/15 22:20:55 1.17 --- editusers.cgi 2000/09/29 04:57:12 *************** *** 1,4 **** ! #!/usr/bonsaitools/bin/perl -w # -*- Mode: perl; indent-tabs-mode: nil -*- # # The contents of this file are subject to the Mozilla Public --- 1,4 ---- ! #!/usr/bin/perl -w # -*- Mode: perl; indent-tabs-mode: nil -*- # # The contents of this file are subject to the Mozilla Public *************** *** 118,126 **** print "\n"; print " Email notification:\n"; print qq{}; ! foreach my $i (["ExcludeSelfChanges", "All qualifying issues except those which I change"], ! ["CConly", "Only those issues which I am listed on the CC line"], ! ["All", "All qualifying issues"]) { my ($tag, $desc) = (@$i); my $selectpart = ""; if ($tag eq $emailnotification) { *************** *** 143,149 **** SendSQL("SELECT bit,name,description,bit & $groupset != 0, " . " bit & $blessgroupset " . "FROM groups " . ! "WHERE bit & $opblessgroupset != 0 AND isbuggroup " . "ORDER BY name"); print "Group Access:"; if (MoreSQLData()) { --- 143,149 ---- SendSQL("SELECT bit,name,description,bit & $groupset != 0, " . " bit & $blessgroupset " . "FROM groups " . ! "WHERE bit & $opblessgroupset != 0 AND isissuegroup " . "ORDER BY name"); print " !
                  Group Access:"; if (MoreSQLData()) { *************** *** 169,175 **** SendSQL("SELECT bit,name,description,bit & $groupset != 0, " . " bit & $blessgroupset " . "FROM groups " . ! "WHERE bit & $opblessgroupset != 0 AND !isbuggroup " . "ORDER BY name"); print "
                  Privileges:"; if (MoreSQLData()) { --- 169,175 ---- SendSQL("SELECT bit,name,description,bit & $groupset != 0, " . " bit & $blessgroupset " . "FROM groups " . ! "WHERE bit & $opblessgroupset != 0 AND !isissuegroup " . "ORDER BY name"); print "\n"; print " \n"; print "\n"; ! print " \n"; ! print " \n"; print "
                  Privileges:"; if (MoreSQLData()) { *************** *** 570,576 **** "&component=", url_quote($component), "&action=edit\">$product: $component"; $found = 1; ! $nodelete = 'initial bug owner'; } print "\n" if $found; --- 570,576 ---- "&component=", url_quote($component), "&action=edit\">$product: $component"; $found = 1; ! $nodelete = 'initial issue owner'; } print "\n" if $found; Index: editversions.cgi =================================================================== RCS file: /cvsroot/mozilla/webtools/bugzilla/editversions.cgi,v retrieving revision 1.6 diff -c -r1.6 editversions.cgi *** editversions.cgi 2000/08/30 23:44:35 1.6 --- editversions.cgi 2000/09/29 04:57:12 *************** *** 1,4 **** ! #!/usr/bonsaitools/bin/perl -w # -*- Mode: perl; indent-tabs-mode: nil -*- # # The contents of this file are subject to the Mozilla Public --- 1,4 ---- ! #!/usr/bin/perl -w # -*- Mode: perl; indent-tabs-mode: nil -*- # # The contents of this file are subject to the Mozilla Public *************** *** 196,212 **** print "
                  \n"; print " \n"; print " \n"; ! print " \n"; #print " \n"; print ""; while ( MoreSQLData() ) { ! my ($product, $description, $bugs) = FetchSQLData(); $description ||= "missing"; ! $bugs ||= "none"; print "\n"; print " \n"; print " \n"; ! print " \n"; #print " \n"; } print "
                  Edit versions of ...DescriptionBugsEdit
                  $product$description$bugsEdit
                  \n"; --- 196,212 ---- print "\n"; print " \n"; print " \n"; ! print " \n"; #print " \n"; print ""; while ( MoreSQLData() ) { ! my ($product, $description, $issues) = FetchSQLData(); $description ||= "missing"; ! $issues ||= "none"; print "\n"; print " \n"; print " \n"; ! print " \n"; #print " \n"; } print "
                  Edit versions of ...DescriptionIssuesEdit
                  $product$description$issuesEdit
                  \n"; *************** *** 228,238 **** =for me # Das geht nicht wie vermutet. Ich bekomme nicht alle Versionen ! # angezeigt! Schade. Ich würde gerne sehen, wieviel Bugs pro # Version angegeben sind ... ! SendSQL("SELECT value,program,COUNT(bug_id) ! FROM versions LEFT JOIN bugs ON program=product AND value=version WHERE program=" . SqlQuote($product) . " GROUP BY value"); --- 228,238 ---- =for me # Das geht nicht wie vermutet. Ich bekomme nicht alle Versionen ! # angezeigt! Schade. Ich würde gerne sehen, wieviel Issues pro # Version angegeben sind ... ! SendSQL("SELECT value,program,COUNT(issue_id) ! FROM versions LEFT JOIN issues ON program=product AND value=version WHERE program=" . SqlQuote($product) . " GROUP BY value"); *************** *** 246,260 **** print "\n"; print " \n"; ! #print " \n"; print " \n"; print ""; while ( MoreSQLData() ) { ! my ($version,$dummy,$bugs) = FetchSQLData(); ! $bugs ||= 'none'; print "\n"; print " \n"; ! #print " \n"; print " \n"; print ""; } --- 246,260 ---- print "
                  Edit version ...BugsAction
                  $version$bugsDelete
                  \n"; print " \n"; ! #print " \n"; print " \n"; print ""; while ( MoreSQLData() ) { ! my ($version,$dummy,$issues) = FetchSQLData(); ! $issues ||= 'none'; print "\n"; print " \n"; ! #print " \n"; print " \n"; print ""; } *************** *** 280,286 **** PutHeader("Add version of $product"); CheckProduct($product); ! #print "This page lets you add a new version to a bugzilla-tracked product.\n"; print "\n"; print "
                  Edit version ...IssuesAction
                  $version$issuesDelete
                  \n"; --- 280,286 ---- PutHeader("Add version of $product"); CheckProduct($product); ! #print "This page lets you add a new version to an issuezilla-tracked product.\n"; print "\n"; print "
                  \n"; *************** *** 351,362 **** PutHeader("Delete version of $product"); CheckVersion($product, $version); ! SendSQL("SELECT count(bug_id),product,version ! FROM bugs GROUP BY product,version HAVING product=" . SqlQuote($product) . " AND version=" . SqlQuote($version)); ! my $bugs = FetchOneColumn(); print "
                  \n"; print "\n"; --- 351,362 ---- PutHeader("Delete version of $product"); CheckVersion($product, $version); ! SendSQL("SELECT count(issue_id),product,version ! FROM issues GROUP BY product,version HAVING product=" . SqlQuote($product) . " AND version=" . SqlQuote($version)); ! my $issues = FetchOneColumn(); print "
                  \n"; print "\n"; *************** *** 370,393 **** print " \n"; print " \n"; print "\n"; ! print " \n"; ! print " \n"; print "
                  Version:$version
                  Bugs:", $bugs || 'none' , "
                  \n"; print "

                  Confirmation

                  \n"; ! if ($bugs) { ! if (!Param("allowbugdeletion")) { ! print "Sorry, there are $bugs bugs outstanding for this version. ! You must reassign those bugs to another version before you can delete this one."; PutTrailer($localtrailer); exit; } print "
                  \n", ! "There are bugs entered for this version! When you delete this ", ! "version, all stored bugs will be deleted, too. ", ! "You could not even see the bug history for this version anymore!\n", "
                  \n"; } --- 370,393 ---- print "
                  Version:$version
                  Issues:", $issues || 'none' , "
                  \n"; print "

                  Confirmation

                  \n"; ! if ($issues) { ! if (!Param("allowissuedeletion")) { ! print "Sorry, there are $issues issues outstanding for this version. ! You must reassign those issues to another version before you can delete this one."; PutTrailer($localtrailer); exit; } print "
                  \n", ! "There are issues entered for this version! When you delete this ", ! "version, all stored issues will be deleted, too. ", ! "You could not even see the issue history for this version anymore!\n", "
                  \n"; } *************** *** 418,460 **** # lock the tables before we start to change everything: SendSQL("LOCK TABLES attachments WRITE, ! bugs WRITE, ! bugs_activity WRITE, versions WRITE, dependencies WRITE"); # According to MySQL doc I cannot do a DELETE x.* FROM x JOIN Y, ! # so I have to iterate over bugs and delete all the indivial entries ! # in bugs_activies and attachments. ! if (Param("allowbugdeletion")) { ! SendSQL("SELECT bug_id ! FROM bugs WHERE product=" . SqlQuote($product) . " AND version=" . SqlQuote($version)); while (MoreSQLData()) { ! my $bugid = FetchOneColumn(); my $query = ! $::db->query("DELETE FROM attachments WHERE bug_id=$bugid") or die "$::db_errstr"; $query = ! $::db->query("DELETE FROM bugs_activity WHERE bug_id=$bugid") or die "$::db_errstr"; $query = ! $::db->query("DELETE FROM dependencies WHERE blocked=$bugid") or die "$::db_errstr"; } ! print "Attachments, bug activity and dependencies deleted.
                  \n"; # Deleting the rest is easier: ! SendSQL("DELETE FROM bugs WHERE product=" . SqlQuote($product) . " AND version=" . SqlQuote($version)); ! print "Bugs deleted.
                  \n"; } SendSQL("DELETE FROM versions --- 418,460 ---- # lock the tables before we start to change everything: SendSQL("LOCK TABLES attachments WRITE, ! issues WRITE, ! issues_activity WRITE, versions WRITE, dependencies WRITE"); # According to MySQL doc I cannot do a DELETE x.* FROM x JOIN Y, ! # so I have to iterate over issues and delete all the indivial entries ! # in issues_activies and attachments. ! if (Param("allowissuedeletion")) { ! SendSQL("SELECT issue_id ! FROM issues WHERE product=" . SqlQuote($product) . " AND version=" . SqlQuote($version)); while (MoreSQLData()) { ! my $issueid = FetchOneColumn(); my $query = ! $::db->query("DELETE FROM attachments WHERE issue_id=$issueid") or die "$::db_errstr"; $query = ! $::db->query("DELETE FROM issues_activity WHERE issue_id=$issueid") or die "$::db_errstr"; $query = ! $::db->query("DELETE FROM dependencies WHERE blocked=$issueid") or die "$::db_errstr"; } ! print "Attachments, issue activity and dependencies deleted.
                  \n"; # Deleting the rest is easier: ! SendSQL("DELETE FROM issues WHERE product=" . SqlQuote($product) . " AND version=" . SqlQuote($version)); ! print "Issues deleted.
                  \n"; } SendSQL("DELETE FROM versions *************** *** 516,522 **** # Note that the order of this tests is important. If you change # them, be sure to test for WHERE='$version' or WHERE='$versionold' ! SendSQL("LOCK TABLES bugs WRITE, versions WRITE"); if ($version ne $versionold) { --- 516,522 ---- # Note that the order of this tests is important. If you change # them, be sure to test for WHERE='$version' or WHERE='$versionold' ! SendSQL("LOCK TABLES issues WRITE, versions WRITE"); if ($version ne $versionold) { *************** *** 532,538 **** SendSQL("UNLOCK TABLES"); exit; } ! SendSQL("UPDATE bugs SET version=" . SqlQuote($version) . " WHERE version=" . SqlQuote($versionold) . " AND product=" . SqlQuote($product)); --- 532,538 ---- SendSQL("UNLOCK TABLES"); exit; } ! SendSQL("UPDATE issues SET version=" . SqlQuote($version) . " WHERE version=" . SqlQuote($versionold) . " AND product=" . SqlQuote($product)); Index: enter_bug.cgi =================================================================== RCS file: /cvsroot/mozilla/webtools/bugzilla/enter_bug.cgi,v retrieving revision 1.40 diff -c -r1.40 enter_bug.cgi *** enter_bug.cgi 2000/08/30 21:32:43 1.40 --- enter_bug.cgi 2000/09/29 04:57:12 *************** *** 1,4 **** ! #!/usr/bonsaitools/bin/perl -w # -*- Mode: perl; indent-tabs-mode: nil -*- # # The contents of this file are subject to the Mozilla Public --- 1,4 ---- ! #!/usr/bin/perl -w # -*- Mode: perl; indent-tabs-mode: nil -*- # # The contents of this file are subject to the Mozilla Public *************** *** 11,17 **** # 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 --- 11,17 ---- # implied. See the License for the specific language governing # rights and limitations under the License. # ! # The Original Code is the Issuezilla Issue Tracking System. # # The Initial Developer of the Original Code is Netscape Communications # Corporation. Portions created by Netscape are Copyright (C) 1998 *************** *** 26,32 **** # # enter_bug.cgi # ------------- ! # Displays bug entry form. Bug fields are specified through popup menus, # drop-down lists, or text fields. Default for these values can be passed # in as parameters to the cgi. # --- 26,32 ---- # # enter_bug.cgi # ------------- ! # Displays issue entry form. Issue fields are specified through popup menus, # drop-down lists, or text fields. Default for these values can be passed # in as parameters to the cgi. # *************** *** 46,61 **** $zz = @::legal_opsys; $zz = @::legal_platform; $zz = @::legal_priority; ! $zz = @::legal_severity; } ! # I've moved the call to confirm_login up to here, since if we're using bug ! # groups to restrict bug entry, we need to know who the user is right from # the start. If that parameter is turned off, there's still no harm done in # doing it now instead of a bit later. -JMR, 2/18/00 # Except that it will cause people without cookies enabled to have to log # in an extra time. Only do it here if we really need to. -terry, 3/10/00 ! if (Param("usebuggroupsentry")) { confirm_login(); } --- 46,61 ---- $zz = @::legal_opsys; $zz = @::legal_platform; $zz = @::legal_priority; ! $zz = @::legal_issue_type; } ! # I've moved the call to confirm_login up to here, since if we're using issue ! # groups to restrict issue entry, we need to know who the user is right from # the start. If that parameter is turned off, there's still no harm done in # doing it now instead of a bit later. -JMR, 2/18/00 # Except that it will cause people without cookies enabled to have to log # in an extra time. Only do it here if we really need to. -terry, 3/10/00 ! if (Param("useissuegroupsentry")) { confirm_login(); } *************** *** 65,79 **** foreach my $p (sort(keys %::versions)) { if (defined $::proddesc{$p} && $::proddesc{$p} eq '0') { # Special hack. If we stuffed a "0" into proddesc, that means ! # that disallownew was set for this bug, and so we don't want # to allow people to specify that product here. next; } ! if(Param("usebuggroupsentry") && GroupExists($p) && !UserInGroup($p)) { ! # If we're using bug groups to restrict entry on products, and ! # this product has a bug group, and the user is not in that # group, we don't want to include that product in this list. next; } --- 65,79 ---- foreach my $p (sort(keys %::versions)) { if (defined $::proddesc{$p} && $::proddesc{$p} eq '0') { # Special hack. If we stuffed a "0" into proddesc, that means ! # that disallownew was set for this issue, and so we don't want # to allow people to specify that product here. next; } ! if(Param("useissuegroupsentry") && GroupExists($p) && !UserInGroup($p)) { ! # If we're using issue groups to restrict entry on products, and ! # this product has an issue group, and the user is not in that # group, we don't want to include that product in this list. next; } *************** *** 81,103 **** } if (1 != @prodlist) { print "Content-type: text/html\n\n"; ! PutHeader("Enter Bug"); print "

                  First, you must pick a product on which to enter\n"; ! print "a bug.

                  \n"; print ""; foreach my $p (@prodlist) { if (defined $::proddesc{$p} && $::proddesc{$p} eq '0') { # Special hack. If we stuffed a "0" into proddesc, that means ! # that disallownew was set for this bug, and so we don't want # to allow people to specify that product here. next; } ! if(Param("usebuggroupsentry") && GroupExists($p) && !UserInGroup($p)) { ! # If we're using bug groups to restrict entry on products, and ! # this product has a bug group, and the user is not in that # group, we don't want to include that product in this list. next; } --- 81,103 ---- } if (1 != @prodlist) { print "Content-type: text/html\n\n"; ! PutHeader("Enter Issue"); print "

                  First, you must pick a product on which to enter\n"; ! print "an issue.

                  \n"; print "
                  "; foreach my $p (@prodlist) { if (defined $::proddesc{$p} && $::proddesc{$p} eq '0') { # Special hack. If we stuffed a "0" into proddesc, that means ! # that disallownew was set for this issue, and so we don't want # to allow people to specify that product here. next; } ! if(Param("useissuegroupsentry") && GroupExists($p) && !UserInGroup($p)) { ! # If we're using issue groups to restrict entry on products, and ! # this product has an issue group, and the user is not in that # group, we don't want to include that product in this list. next; } *************** *** 231,238 **** my $priority_popup = make_popup('priority', \@::legal_priority, formvalue('priority', $priority), 0); ! my $sev_popup = make_popup('bug_severity', \@::legal_severity, ! formvalue('bug_severity', 'normal'), 0); my $platform_popup = make_popup('rep_platform', \@::legal_platform, pickplatform(), 0); my $opsys_popup = make_popup('op_sys', \@::legal_opsys, pickos(), 0); --- 231,238 ---- my $priority_popup = make_popup('priority', \@::legal_priority, formvalue('priority', $priority), 0); ! my $issuetype_popup = make_popup('issue_type', \@::legal_issue_type, ! formvalue('issue_type', 'DEFECT'), 0); my $platform_popup = make_popup('rep_platform', \@::legal_platform, pickplatform(), 0); my $opsys_popup = make_popup('op_sys', \@::legal_opsys, pickos(), 0); *************** *** 240,246 **** if (0 == $::components{$product}) { print "

                  Permission Denied

                  \n"; print "Sorry. You need to have at least one component for this product\n"; ! print "in order to create a new bug. Go to the \"Components\" link to create\n"; print "a new component\n"; print "

                  \n"; PutFooter(); --- 240,246 ---- if (0 == $::components{$product}) { print "

                  Permission Denied

                  \n"; print "Sorry. You need to have at least one component for this product\n"; ! print "in order to create a new issue. Go to the \"Components\" link to create\n"; print "a new component\n"; print "

                  \n"; PutFooter(); *************** *** 253,283 **** my $component_popup = make_popup('component', $::components{$product}, formvalue('component'), 1); ! PutHeader ("Enter Bug","Enter Bug","This page lets you enter a new bug into Bugzilla."); # Modified, -JMR, 2/24,00 ! # If the usebuggroupsentry parameter is set, we need to check and make sure ! # that the user has permission to enter a bug against this product. # Modified, -DDM, 3/11/00 # added GroupExists check so we don't choke on a groupless product ! if(Param("usebuggroupsentry") && GroupExists($product) && !UserInGroup($product)) { print "

                  Permission denied.

                  \n"; print "Sorry; you do not have the permissions necessary to enter\n"; ! print "a bug against this product.\n"; print "

                  \n"; PutFooter(); exit; } # Modified, -JMR, 2/18/00 ! # I'm putting in a select box in order to select whether to restrict this bug to ! # the product's bug group or not, if the usebuggroups parameter is set, and if ! # this product has a bug group. This box will default to selected, but can be ! # turned off if this bug should be world-viewable for some reason. # ! # To do this, I need to (1) get the bit and description for the bug group from # the database, (2) insert the select box in the giant print statements below, # and (3) update post_bug.cgi to process the additional input field. --- 253,283 ---- my $component_popup = make_popup('component', $::components{$product}, formvalue('component'), 1); ! PutHeader ("Enter Issue","Enter Issue","This page lets you enter a new issue into Issuezilla."); # Modified, -JMR, 2/24,00 ! # If the useissuegroupsentry parameter is set, we need to check and make sure ! # that the user has permission to enter an issue against this product. # Modified, -DDM, 3/11/00 # added GroupExists check so we don't choke on a groupless product ! if(Param("useissuegroupsentry") && GroupExists($product) && !UserInGroup($product)) { print "

                  Permission denied.

                  \n"; print "Sorry; you do not have the permissions necessary to enter\n"; ! print "an issue against this product.\n"; print "

                  \n"; PutFooter(); exit; } # Modified, -JMR, 2/18/00 ! # I'm putting in a select box in order to select whether to restrict this issue to ! # the product's issue group or not, if the useissuegroups parameter is set, and if ! # this product has an issue group. This box will default to selected, but can be ! # turned off if this issue should be world-viewable for some reason. # ! # To do this, I need to (1) get the bit and description for the issue group from # the database, (2) insert the select box in the giant print statements below, # and (3) update post_bug.cgi to process the additional input field. *************** *** 287,302 **** # in later on. # First we get the bit and description for the group. my $group_bit=0; ! if(Param("usebuggroups") && GroupExists($product)) { SendSQL("select bit from groups ". "where name = ".SqlQuote($product)." ". ! "and isbuggroup != 0"); ($group_bit) = FetchSQLData(); } print " !

                  "; --- 287,302 ---- # in later on. # First we get the bit and description for the group. my $group_bit=0; ! if(Param("useissuegroups") && GroupExists($product)) { SendSQL("select bit from groups ". "where name = ".SqlQuote($product)." ". ! "and isissuegroup != 0"); ($group_bit) = FetchSQLData(); } print " !
                  "; *************** *** 314,320 **** print " ! --- 314,320 ---- print " ! *************** *** 345,359 **** value_quote($priority) . '">'; } print " ! ! "; ! if (UserInGroup("editbugs") || UserInGroup("canconfirm")) { SendSQL("SELECT votestoconfirm FROM products WHERE product = " . SqlQuote($product)); if (FetchOneColumn()) { --- 345,359 ---- value_quote($priority) . '">'; } print " ! ! "; ! if (UserInGroup("editissues") || UserInGroup("canconfirm")) { SendSQL("SELECT votestoconfirm FROM products WHERE product = " . SqlQuote($product)); if (FetchOneColumn()) { *************** *** 362,368 **** "; --- 362,368 ---- "; *************** *** 384,391 **** --- 384,391 ---- *************** *** 410,421 **** if ($::usergroupset ne '0') { SendSQL("SELECT bit, description FROM groups " . "WHERE bit & $::usergroupset != 0 " . ! " AND isbuggroup != 0 ORDER BY description"); while (MoreSQLData()) { my ($bit, $description) = (FetchSQLData()); # Rather than waste time with another Param check and another database # access, $group_bit will only have a non-zero value if we're using ! # bug groups and have one for this product, so I'll check on that # instead here. -JMR, 2/18/00 # Moved this check to this location to fix conflict with existing # select-box patch. Also, if $group_bit is 0, it won't match the --- 410,421 ---- if ($::usergroupset ne '0') { SendSQL("SELECT bit, description FROM groups " . "WHERE bit & $::usergroupset != 0 " . ! " AND isissuegroup != 0 ORDER BY description"); while (MoreSQLData()) { my ($bit, $description) = (FetchSQLData()); # Rather than waste time with another Param check and another database # access, $group_bit will only have a non-zero value if we're using ! # issue groups and have one for this product, so I'll check on that # instead here. -JMR, 2/18/00 # Moved this check to this location to fix conflict with existing # select-box patch. Also, if $group_bit is 0, it won't match the *************** *** 431,439 **** } print BuildPulldown("bit-$bit", [["0", ! "People not in the \"$description\" group can see this bug"], ["1", ! "Only people in the \"$description\" group can see this bug"]], $check); print "
                  \n"; } --- 431,439 ---- } print BuildPulldown("bit-$bit", [["0", ! "People not in the \"$description\" group can see this issue"], ["1", ! "Only people in the \"$description\" group can see this issue"]], $check); print "
                  \n"; } *************** *** 445,451 ****
                  Reporter:$::COOKIE{'Bugzilla_login'} Product: $product
                  Reporter:$::COOKIE{'Issuezilla_login'} Product: $product
                  Severity:$sev_popup
                   
                  Issue type:$issuetype_popup
                   
                  Initial state: }; ! print BuildPulldown("bug_status", [[$::unconfirmedstate], ["NEW"]], "NEW"); print "
                  Initial state: }; ! print BuildPulldown("issue_status", [[$::unconfirmedstate], ["NEW"]], "NEW"); print "
                  URL: !
                  URL: !
                  !           --- 445,451 ----
                  !           *************** *** 467,473 **** } print "
                  ! \n"; PutFooter(); --- 467,473 ---- } print "
                  ! \n"; PutFooter(); Index: globals.pl =================================================================== RCS file: /cvsroot/mozilla/webtools/bugzilla/globals.pl,v retrieving revision 1.76 diff -c -r1.76 globals.pl *** globals.pl 2000/09/15 22:20:54 1.76 --- globals.pl 2000/09/29 04:57:12 *************** *** 10,16 **** # 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 --- 10,16 ---- # implied. See the License for the specific language governing # rights and limitations under the License. # ! # The Original Code is the Issuezilla Issue Tracking System. # # The Initial Developer of the Original Code is Netscape Communications # Corporation. Portions created by Netscape are *************** *** 20,26 **** # Contributor(s): Terry Weissman # Dan Mosedale ! # Contains some global variables and routines used throughout bugzilla. use diagnostics; use strict; --- 20,26 ---- # Contributor(s): Terry Weissman # Dan Mosedale ! # Contains some global variables and routines used throughout issuezilla. use diagnostics; use strict; *************** *** 35,48 **** $zz = $main::defaultqueryname; $zz = @main::dontchange; $zz = %main::keywordsbyname; ! $zz = @main::legal_bug_status; $zz = @main::legal_components; $zz = @main::legal_keywords; $zz = @main::legal_opsys; $zz = @main::legal_platform; $zz = @main::legal_priority; $zz = @main::legal_product; ! $zz = @main::legal_severity; $zz = @main::legal_target_milestone; $zz = @main::legal_versions; $zz = @main::milestoneurl; --- 35,48 ---- $zz = $main::defaultqueryname; $zz = @main::dontchange; $zz = %main::keywordsbyname; ! $zz = @main::legal_issue_status; $zz = @main::legal_components; $zz = @main::legal_keywords; $zz = @main::legal_opsys; $zz = @main::legal_platform; $zz = @main::legal_priority; $zz = @main::legal_product; ! $zz = @main::legal_issue_type; $zz = @main::legal_target_milestone; $zz = @main::legal_versions; $zz = @main::milestoneurl; *************** *** 55,62 **** # my $db_host = "localhost"; ! my $db_name = "bugs"; ! my $db_user = "bugs"; my $db_pass = ""; do 'localconfig'; --- 55,62 ---- # my $db_host = "localhost"; ! my $db_name = "issues"; ! my $db_user = "issues"; my $db_pass = ""; do 'localconfig'; *************** *** 68,74 **** # use Carp; # for confess use RelationSet; ! # Contains the version string for the current running Bugzilla. $::param{'version'} = '2.11'; $::dontchange = "--do_not_change--"; --- 68,74 ---- # use Carp; # for confess use RelationSet; ! # Contains the version string for the current running Issuezilla. $::param{'version'} = '2.11'; $::dontchange = "--do_not_change--"; *************** *** 180,190 **** ! @::default_column_list = ("severity", "priority", "platform", "owner", "status", "resolution", "summary"); sub AppendComment { ! my ($bugid,$who,$comment) = (@_); $comment =~ s/\r\n/\n/g; # Get rid of windows-style line endings. $comment =~ s/\r/\n/g; # Get rid of mac-style line endings. if ($comment =~ /^\s*$/) { # Nothin' but whitespace. --- 180,190 ---- ! @::default_column_list = ("issue_type", "priority", "platform", "owner", "status", "resolution", "summary"); sub AppendComment { ! my ($issueid,$who,$comment) = (@_); $comment =~ s/\r\n/\n/g; # Get rid of windows-style line endings. $comment =~ s/\r/\n/g; # Get rid of mac-style line endings. if ($comment =~ /^\s*$/) { # Nothin' but whitespace. *************** *** 193,202 **** my $whoid = DBNameToIdAndCheck($who); ! SendSQL("INSERT INTO longdescs (bug_id, who, bug_when, thetext) " . ! "VALUES($bugid, $whoid, now(), " . SqlQuote($comment) . ")"); ! SendSQL("UPDATE bugs SET delta_ts = now() WHERE bug_id = $bugid"); } sub GetFieldID { --- 193,202 ---- my $whoid = DBNameToIdAndCheck($who); ! SendSQL("INSERT INTO longdescs (issue_id, who, issue_when, thetext) " . ! "VALUES($issueid, $whoid, now(), " . SqlQuote($comment) . ")"); ! SendSQL("UPDATE issues SET delta_ts = now() WHERE issue_id = $issueid"); } sub GetFieldID { *************** *** 385,391 **** $::proddesc{$p} = $d; if ($dis) { # Special hack. Stomp on the description and make it "0" if we're ! # not supposed to allow new bugs against this product. This is # checked for in enter_bug.cgi. $::proddesc{$p} = "0"; } --- 385,391 ---- $::proddesc{$p} = $d; if ($dis) { # Special hack. Stomp on the description and make it "0" if we're ! # not supposed to allow new issues against this product. This is # checked for in enter_bug.cgi. $::proddesc{$p} = "0"; } *************** *** 399,408 **** } ! my $cols = LearnAboutColumns("bugs"); @::log_columns = @{$cols->{"-list-"}}; ! foreach my $i ("bug_id", "creation_ts", "delta_ts", "lastdiffed") { my $w = lsearch(\@::log_columns, $i); if ($w >= 0) { splice(@::log_columns, $w, 1); --- 399,408 ---- } ! my $cols = LearnAboutColumns("issues"); @::log_columns = @{$cols->{"-list-"}}; ! foreach my $i ("issue_id", "creation_ts", "delta_ts", "lastdiffed") { my $w = lsearch(\@::log_columns, $i); if ($w >= 0) { splice(@::log_columns, $w, 1); *************** *** 411,426 **** @::log_columns = (sort(@::log_columns)); @::legal_priority = SplitEnumType($cols->{"priority,type"}); ! @::legal_severity = SplitEnumType($cols->{"bug_severity,type"}); @::legal_platform = SplitEnumType($cols->{"rep_platform,type"}); @::legal_opsys = SplitEnumType($cols->{"op_sys,type"}); ! @::legal_bug_status = SplitEnumType($cols->{"bug_status,type"}); @::legal_resolution = SplitEnumType($cols->{"resolution,type"}); # 'settable_resolution' is the list of resolutions that may be set ! # directly by hand in the bug form. Start with the list of legal # resolutions and remove 'MOVED' and 'DUPLICATE' because setting ! # bugs to those resolutions requires a special process. # @::settable_resolution = @::legal_resolution; my $w = lsearch(\@::settable_resolution, "DUPLICATE"); --- 411,426 ---- @::log_columns = (sort(@::log_columns)); @::legal_priority = SplitEnumType($cols->{"priority,type"}); ! @::legal_issue_type = SplitEnumType($cols->{"issue_type,type"}); @::legal_platform = SplitEnumType($cols->{"rep_platform,type"}); @::legal_opsys = SplitEnumType($cols->{"op_sys,type"}); ! @::legal_issue_status = SplitEnumType($cols->{"issue_status,type"}); @::legal_resolution = SplitEnumType($cols->{"resolution,type"}); # 'settable_resolution' is the list of resolutions that may be set ! # directly by hand in the issue form. Start with the list of legal # resolutions and remove 'MOVED' and 'DUPLICATE' because setting ! # issues to those resolutions requires a special process. # @::settable_resolution = @::legal_resolution; my $w = lsearch(\@::settable_resolution, "DUPLICATE"); *************** *** 434,441 **** my @list = sort { uc($a) cmp uc($b)} keys(%::versions); @::legal_product = @list; ! mkdir("data", 0777); ! chmod 0777, "data"; my $tmpname = "data/versioncache.$$"; open(FID, ">$tmpname") || die "Can't create $tmpname"; --- 434,441 ---- my @list = sort { uc($a) cmp uc($b)} keys(%::versions); @::legal_product = @list; ! mkdir("data", 0700); ! chmod 0700, "data"; my $tmpname = "data/versioncache.$$"; open(FID, ">$tmpname") || die "Can't create $tmpname"; *************** *** 452,459 **** print FID GenerateCode('%::components'); @::legal_components = sort {uc($a) cmp uc($b)} keys(%carray); print FID GenerateCode('@::legal_components'); ! foreach my $i('product', 'priority', 'severity', 'platform', 'opsys', ! 'bug_status', 'resolution') { print FID GenerateCode('@::legal_' . $i); } print FID GenerateCode('@::settable_resolution'); --- 452,459 ---- print FID GenerateCode('%::components'); @::legal_components = sort {uc($a) cmp uc($b)} keys(%carray); print FID GenerateCode('@::legal_components'); ! foreach my $i('product', 'priority', 'issue_type', 'platform', 'opsys', ! 'issue_status', 'resolution') { print FID GenerateCode('@::legal_' . $i); } print FID GenerateCode('@::settable_resolution'); *************** *** 497,503 **** print FID "1;\n"; close FID; rename $tmpname, "data/versioncache" || die "Can't rename $tmpname to versioncache"; ! chmod 0666, "data/versioncache"; } --- 497,503 ---- print FID "1;\n"; close FID; rename $tmpname, "data/versioncache" || die "Can't rename $tmpname to versioncache"; ! chmod 0600, "data/versioncache"; } *************** *** 623,629 **** } else { print "The name $name is not a valid username. Either you\n"; print "misspelled it, or the person has not registered for a\n"; ! print "Bugzilla account.\n"; print "

                  Please hit the Back button and try again.\n"; } exit(0); --- 623,629 ---- } else { print "The name $name is not a valid username. Either you\n"; print "misspelled it, or the person has not registered for a\n"; ! print "Issuezilla account.\n"; print "

                  Please hit the Back button and try again.\n"; } exit(0); *************** *** 673,679 **** $things[$count++] = $item; } ! while ($text =~ s/\bbug(\s|%\#)*(\d+)/"##$count##"/ei) { my $item = $&; my $num = $2; $item = value_quote($item); # Not really necessary, since we know --- 673,679 ---- $things[$count++] = $item; } ! while ($text =~ s/\bissue(\s|%\#)*(\d+)/"##$count##"/ei) { my $item = $&; my $num = $2; $item = value_quote($item); # Not really necessary, since we know *************** *** 681,687 **** $item = qq{$item}; $things[$count++] = $item; } ! while ($text =~ s/\*\*\* This bug has been marked as a duplicate of (\d+) \*\*\*/"##$count##"/ei) { my $item = $&; my $num = $1; $item =~ s@\d+@$num@; --- 681,687 ---- $item = qq{$item}; $things[$count++] = $item; } ! while ($text =~ s/\*\*\* This issue has been marked as a duplicate of (\d+) \*\*\*/"##$count##"/ei) { my $item = $&; my $num = $1; $item =~ s@\d+@$num@; *************** *** 714,736 **** my ($id, $start, $end) = (@_); my $result = ""; my $count = 0; ! my ($query) = ("SELECT profiles.login_name, longdescs.bug_when, " . " longdescs.thetext " . "FROM longdescs, profiles " . "WHERE profiles.userid = longdescs.who " . ! " AND longdescs.bug_id = $id "); if ($start && $start =~ /[1-9]/) { # If the start is all zeros, then don't do this (because we want to # not emit a leading "Additional Comments" line in that case.) ! $query .= "AND longdescs.bug_when > '$start'"; $count = 1; } if ($end) { ! $query .= "AND longdescs.bug_when <= '$end'"; } ! $query .= "ORDER BY longdescs.bug_when"; SendSQL($query); while (MoreSQLData()) { my ($who, $when, $text) = (FetchSQLData()); --- 714,736 ---- my ($id, $start, $end) = (@_); my $result = ""; my $count = 0; ! my ($query) = ("SELECT profiles.login_name, longdescs.issue_when, " . " longdescs.thetext " . "FROM longdescs, profiles " . "WHERE profiles.userid = longdescs.who " . ! " AND longdescs.issue_id = $id "); if ($start && $start =~ /[1-9]/) { # If the start is all zeros, then don't do this (because we want to # not emit a leading "Additional Comments" line in that case.) ! $query .= "AND longdescs.issue_when > '$start'"; $count = 1; } if ($end) { ! $query .= "AND longdescs.issue_when <= '$end'"; } ! $query .= "ORDER BY longdescs.issue_when"; SendSQL($query); while (MoreSQLData()) { my ($who, $when, $text) = (FetchSQLData()); *************** *** 751,778 **** my $result = ""; my $count = 0; my %knownattachments; ! SendSQL("SELECT attach_id FROM attachments WHERE bug_id = $id"); while (MoreSQLData()) { $knownattachments{FetchOneColumn()} = 1; } ! my ($query) = ("SELECT profiles.realname, profiles.login_name, longdescs.bug_when, " . " longdescs.thetext " . "FROM longdescs, profiles " . "WHERE profiles.userid = longdescs.who " . ! " AND longdescs.bug_id = $id "); if ($start && $start =~ /[1-9]/) { # If the start is all zeros, then don't do this (because we want to # not emit a leading "Additional Comments" line in that case.) ! $query .= "AND longdescs.bug_when > '$start'"; $count = 1; } if ($end) { ! $query .= "AND longdescs.bug_when <= '$end'"; } ! $query .= "ORDER BY longdescs.bug_when"; SendSQL($query); while (MoreSQLData()) { my ($who, $email, $when, $text) = (FetchSQLData()); --- 751,778 ---- my $result = ""; my $count = 0; my %knownattachments; ! SendSQL("SELECT attach_id FROM attachments WHERE issue_id = $id"); while (MoreSQLData()) { $knownattachments{FetchOneColumn()} = 1; } ! my ($query) = ("SELECT profiles.realname, profiles.login_name, longdescs.issue_when, " . " longdescs.thetext " . "FROM longdescs, profiles " . "WHERE profiles.userid = longdescs.who " . ! " AND longdescs.issue_id = $id "); if ($start && $start =~ /[1-9]/) { # If the start is all zeros, then don't do this (because we want to # not emit a leading "Additional Comments" line in that case.) ! $query .= "AND longdescs.issue_when > '$start'"; $count = 1; } if ($end) { ! $query .= "AND longdescs.issue_when <= '$end'"; } ! $query .= "ORDER BY longdescs.issue_when"; SendSQL($query); while (MoreSQLData()) { my ($who, $email, $when, $text) = (FetchSQLData()); *************** *** 871,879 **** return $count; } ! # Determines if the given bug_status string represents an "Opened" bug. This # routine ought to be paramaterizable somehow, as people tend to introduce ! # new states into Bugzilla. sub IsOpenedState { my ($state) = (@_); --- 871,879 ---- return $count; } ! # Determines if the given issue_status string represents an "Opened" issue. This # routine ought to be paramaterizable somehow, as people tend to introduce ! # new states into Issuezilla. sub IsOpenedState { my ($state) = (@_); *************** *** 893,899 **** } SendSQL("SELECT profiles.login_name, votes.count " . "FROM votes, profiles " . ! "WHERE votes.bug_id = $id " . "AND profiles.userid = votes.who" . $whopart); my @list; --- 893,899 ---- } SendSQL("SELECT profiles.login_name, votes.count " . "FROM votes, profiles " . ! "WHERE votes.issue_id = $id " . "AND profiles.userid = votes.who" . $whopart); my @list; *************** *** 908,917 **** if (Param('sendmailnow')) { $sendmailparm = ''; } ! if (open(SENDMAIL, "|/usr/lib/sendmail $sendmailparm -t")) { my %substs; $substs{"to"} = $name; ! $substs{"bugid"} = $id; $substs{"reason"} = $reason; $substs{"count"} = $count; my $msg = PerformSubsts(Param("voteremovedmail"), --- 908,917 ---- if (Param('sendmailnow')) { $sendmailparm = ''; } ! if (open(SENDMAIL, "|/var/qmail/bin/qmail-inject -froot")) { ## NPM -- removed "sendmailnow" param, not relevant to qmail my %substs; $substs{"to"} = $name; ! $substs{"issueid"} = $id; $substs{"reason"} = $reason; $substs{"count"} = $count; my $msg = PerformSubsts(Param("voteremovedmail"), *************** *** 920,931 **** close SENDMAIL; } } ! SendSQL("DELETE FROM votes WHERE bug_id = $id" . $whopart); ! SendSQL("SELECT SUM(count) FROM votes WHERE bug_id = $id"); my $v = FetchOneColumn(); $v ||= 0; ! SendSQL("UPDATE bugs SET votes = $v, delta_ts = delta_ts " . ! "WHERE bug_id = $id"); } } --- 920,931 ---- close SENDMAIL; } } ! SendSQL("DELETE FROM votes WHERE issue_id = $id" . $whopart); ! SendSQL("SELECT SUM(count) FROM votes WHERE issue_id = $id"); my $v = FetchOneColumn(); $v ||= 0; ! SendSQL("UPDATE issues SET votes = $v, delta_ts = delta_ts " . ! "WHERE issue_id = $id"); } } *************** *** 947,953 **** if (stat("data/params")) { # Write down and restore the version # here. That way, we get around # anyone who maliciously tries to tweak the version number by editing ! # the params file. Not to mention that in 2.0, there was a bug that # wrote the version number out to the params file... my $v = $::param{'version'}; require "data/params"; --- 947,953 ---- if (stat("data/params")) { # Write down and restore the version # here. That way, we get around # anyone who maliciously tries to tweak the version number by editing ! # the params file. Not to mention that in 2.0, there was an issue that # wrote the version number out to the params file... my $v = $::param{'version'}; require "data/params"; Index: help.html =================================================================== RCS file: /cvsroot/mozilla/webtools/bugzilla/help.html,v retrieving revision 1.4 diff -c -r1.4 help.html *** help.html 2000/01/21 22:01:11 1.4 --- help.html 2000/09/29 04:57:12 *************** *** 10,16 **** 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 --- 10,16 ---- implied. See the License for the specific language governing rights and limitations under the License. ! The Original Code is the Issuezilla Issue Tracking System. The Initial Developer of the Original Code is Netscape Communications Corporation. Portions created by Netscape are *************** *** 24,47 **** Clue

                  A Clue

                  ! 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.

                  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.

                  The default value of this form should correspond roughly to a "personal" ! bug list.


                  Running queries not supported by the pretty boxes

                  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.

                  ! 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.

                  --- 24,47 ---- Clue

                  A Clue

                  ! This form will allow you to call up a subset of the issue list. You should be able to add the URL of the resulting list to your bookmark file in order to preserve queries.

                  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 issue list.

                  The default value of this form should correspond roughly to a "personal" ! issue list.


                  Running queries not supported by the pretty boxes

                  There is a hacky way to do some searches that aren't supported by the ! form. The issuelist script will build queries based on the URL, so you can add other criteria.

                  ! For example, if you wanted to see all issues reported against the X platform ! and assigned to jwz, you could ask for all issues assign to jwz, then edit the URL in the "Location" box, adding the clause "&rep_platform=X-Windows" to the URL.

                  *************** *** 53,64 **** rep_platform op_sys reporter area ! bug_file_loc short_desc


                  Browser Notes

                  !

                  Bugzilla uses several non-standard Netscape extentions, but this does not seem to case any problem with other browsers. The lynx browser does work, but lynx seems to cache results of a .cgi. You'll sometimes need to press CONTROL-R to reload the screen to see an update. --- 53,64 ---- rep_platform op_sys reporter area ! issue_file_loc short_desc


                  Browser Notes

                  !

                  Issuezilla uses several non-standard Netscape extentions, but this does not seem to case any problem with other browsers. The lynx browser does work, but lynx seems to cache results of a .cgi. You'll sometimes need to press CONTROL-R to reload the screen to see an update. Index: helpemailquery.html =================================================================== RCS file: /cvsroot/mozilla/webtools/bugzilla/helpemailquery.html,v retrieving revision 1.1 diff -c -r1.1 helpemailquery.html *** helpemailquery.html 1999/01/19 00:07:45 1.1 --- helpemailquery.html 2000/09/29 04:57:12 *************** *** 10,28 ****

                  ! To search for bugs associated with an email address:

                  • Type a portion of an email address into the text field. !
                  • Select which fields of the bug you expect that address to be in ! the bugs you're looking for.

                  You can look for up to two different email addresses; if you specify ! both, then only bugs which match both will show up. This is useful to ! find bugs that were, for example, created by Ralph and assigned to Fred.

                  --- 10,28 ----

                  ! To search for issues associated with an email address:

                  • Type a portion of an email address into the text field. !
                  • Select which fields of the issue you expect that address to be in ! the issues you're looking for.

                  You can look for up to two different email addresses; if you specify ! both, then only issues which match both will show up. This is useful to ! find issues that were, for example, created by Ralph and assigned to Fred.

                  Index: how_to_mail.html =================================================================== RCS file: /cvsroot/mozilla/webtools/bugzilla/how_to_mail.html,v retrieving revision 1.2 diff -c -r1.2 how_to_mail.html *** how_to_mail.html 1999/11/01 23:33:16 1.2 --- how_to_mail.html 2000/09/29 04:57:12 *************** *** 11,17 **** 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 --- 11,17 ---- implied. See the License for the specific language governing rights and limitations under the License. ! The Original Code is the Issuezilla Issue Tracking System. The Initial Developer of the Original Code is Netscape Communications Corporation. Portions created by Netscape are *************** *** 24,42 **** --> ! How to Mail to bugzilla

                  THIS DOESN'T WORK RIGHT NOW. Coming someday.

                  ! 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:

                    @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
                  --- 24,42 ----
                    -->
                    
                    
                  ! How to Mail to issuezilla
                    
                    

                  THIS DOESN'T WORK RIGHT NOW. Coming someday.

                  ! Mailing to "issuezilla" 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 issue. The control lines look like:

                    @FIELD-LABEL VALUE
                            LABEL           Legal Values
                  !         Issue Type      DEFECT ENHANCEMENT FEATURE TASK PATCH
                  !         Type            ISSUE RFE
                            Product         Cheddar
                            Platform        PC X-Windows Macintosh All
                            Area            CODE JAVA TEST BUILD UI PERF
                  ***************
                  *** 51,78 ****
                    and
                    
                    @description
                  !         This tells the bug parse to stop looking for control lines,
                  !         allowing the bug description to contain lines which start with @
                    
                  There are default values for all these fields. If you don't specify a Summary, the subject of the mail message is used.

                  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.

                  ! 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.

                  EXAMPLE:

                  !     % Mail bugzilla
                        Subject: WinFE crashes with GPF when I pour beer on my keyboard
                  !     @priority critical
                        @platform PC
                        @assign troy
                    
                  --- 51,78 ----
                    and
                    
                    @description
                  !         This tells the issue parse to stop looking for control lines,
                  !         allowing the issue description to contain lines which start with @
                    
                  There are default values for all these fields. If you don't specify a Summary, the subject of the mail message is used.

                  If you specify an illegal value, the default value is used, the ! issue is assigned to you, and the answerback message will describe the error.

                  ! After the issue is posted, you will get mail verifying the posting ! and informing you of the issue number if you wish to fix any mistakes made by the auto-processor.

                  EXAMPLE:

                  !     % Mail issuezilla
                        Subject: WinFE crashes with GPF when I pour beer on my keyboard
                  !     @issue-type ENHANCEMENT
                        @platform PC
                        @assign troy
                    
                  Index: importxml.pl
                  ===================================================================
                  RCS file: /cvsroot/mozilla/webtools/bugzilla/importxml.pl,v
                  retrieving revision 1.13
                  diff -c -r1.13 importxml.pl
                  *** importxml.pl	2000/07/13 23:12:51	1.13
                  --- importxml.pl	2000/09/29 04:57:12
                  ***************
                  *** 1,4 ****
                  ! #!/usr/bonsaitools/bin/perl -w 
                    # -*- Mode: perl; indent-tabs-mode: nil -*-
                    #
                    # The contents of this file are subject to the Mozilla Public
                  --- 1,4 ----
                  ! #!/usr/bin/perl -w 
                    # -*- Mode: perl; indent-tabs-mode: nil -*-
                    #
                    # The contents of this file are subject to the Mozilla Public
                  ***************
                  *** 11,17 ****
                    # 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
                  --- 11,17 ----
                    # implied. See the License for the specific language governing
                    # rights and limitations under the License.
                    #
                  ! # The Original Code is the Issuezilla Issue Tracking System.
                    #
                    # The Initial Developer of the Original Code is Netscape Communications
                    # Corporation. Portions created by Netscape are
                  ***************
                  *** 21,28 ****
                    # Contributor(s): Dawn Endico 
                    
                    
                  ! # This script reads in xml bug data from standard input and inserts 
                  ! # a new bug into bugzilla. Everything before the beginning 
                    
                    
                  ! # This script reads in xml issue data from standard input and inserts 
                  ! # a new issue into issuezilla. Everything before the beginning \n";
                      $header.= "Subject: $subject\n\n";
                    
                      open(SENDMAIL,
                  !     "|/usr/lib/sendmail -ODeliveryMode=background -t") ||
                  !       die "Can't open sendmail";
                      print SENDMAIL $header . $message . "\n";
                      close SENDMAIL;
                    
                  --- 97,108 ----
                      my $header = "To: $to\n";
                      my $from = Param("moved-from-address");
                      $from =~ s/@/\@/g;
                  !   $header.= "From: Issuezilla <$from>\n";
                      $header.= "Subject: $subject\n\n";
                    
                      open(SENDMAIL,
                  !     "|/var/qmail/bin/qmail-inject -froot") ||
                  !       die "Can't open /var/qmail/bin/qmail-inject";
                      print SENDMAIL $header . $message . "\n";
                      close SENDMAIL;
                    
                  ***************
                  *** 123,130 ****
                        if ($::lockcount <= 0) {
                            $::lockcount = 0;
                            if (!open(LOCKFID, ">>data/maillock")) {
                  !             mkdir "data", 0777;
                  !             chmod 0777, "data";
                                open(LOCKFID, ">>data/maillock") || die "Can't open lockfile.";
                            }
                            my $val = flock(LOCKFID,2);
                  --- 123,130 ----
                        if ($::lockcount <= 0) {
                            $::lockcount = 0;
                            if (!open(LOCKFID, ">>data/maillock")) {
                  !             mkdir "data", 0700;
                  !             chmod 0700, "data";
                                open(LOCKFID, ">>data/maillock") || die "Can't open lockfile.";
                            }
                            my $val = flock(LOCKFID,2);
                  ***************
                  *** 132,138 ****
                                print "Content-type: text/html\n\n";
                                print "Lock failed: $val\n";
                            }
                  !         chmod 0666, "data/maillock";
                        }
                        $::lockcount++;
                    }
                  --- 132,138 ----
                                print "Content-type: text/html\n\n";
                                print "Lock failed: $val\n";
                            }
                  !         chmod 0600, "data/maillock";
                        }
                        $::lockcount++;
                    }
                  ***************
                  *** 160,169 ****
                    if (defined $tree->[1][0]->{'maintainer'}) {
                      $maintainer= $tree->[1][0]->{'maintainer'}; 
                    } else {
                  !   my $subject = "Bug import error: no maintainer";
                  !   my $message = "Cannot import these bugs because no maintainer for "; 
                      $message .=   "the exporting db is given.\n";
                  !   $message .=   "\n\nPlease re-open the original bug.\n";
                      $message .= "\n\n$xml";
                      my @to = (Param("maintainer"));
                      MailMessage ($subject, $message, @to);
                  --- 160,169 ----
                    if (defined $tree->[1][0]->{'maintainer'}) {
                      $maintainer= $tree->[1][0]->{'maintainer'}; 
                    } else {
                  !   my $subject = "Issue import error: no maintainer";
                  !   my $message = "Cannot import these issues because no maintainer for "; 
                      $message .=   "the exporting db is given.\n";
                  !   $message .=   "\n\nPlease re-open the original issue.\n";
                      $message .= "\n\n$xml";
                      my @to = (Param("maintainer"));
                      MailMessage ($subject, $message, @to);
                  ***************
                  *** 174,182 ****
                    if (defined $tree->[1][0]->{'exporter'}) {
                      $exporter = $tree->[1][0]->{'exporter'};
                    } else {
                  !   my $subject = "Bug import error: no exporter";
                  !   my $message = "Cannot import these bugs because no exporter is given.\n";
                  !   $message .=   "\n\nPlease re-open the original bug.\n";
                      $message .= "\n\n$xml";
                      my @to = (Param("maintainer"), $maintainer);
                      MailMessage ($subject, $message, @to);
                  --- 174,182 ----
                    if (defined $tree->[1][0]->{'exporter'}) {
                      $exporter = $tree->[1][0]->{'exporter'};
                    } else {
                  !   my $subject = "Issue import error: no exporter";
                  !   my $message = "Cannot import these issues because no exporter is given.\n";
                  !   $message .=   "\n\nPlease re-open the original issue.\n";
                      $message .= "\n\n$xml";
                      my @to = (Param("maintainer"), $maintainer);
                      MailMessage ($subject, $message, @to);
                  ***************
                  *** 185,192 ****
                    
                    
                    unless ( Param("move-enabled") ) {
                  !   my $subject = "Error: bug importing is disabled here";
                  !   my $message = "Cannot import these bugs because importing is disabled\n";
                      $message .= "at this site. For more info, contact ";
                      $message .=  Param("maintainer") . ".\n";
                      my @to = (Param("maintainer"), $maintainer, $exporter);
                  --- 185,192 ----
                    
                    
                    unless ( Param("move-enabled") ) {
                  !   my $subject = "Error: issue importing is disabled here";
                  !   my $message = "Cannot import these issues because importing is disabled\n";
                      $message .= "at this site. For more info, contact ";
                      $message .=  Param("maintainer") . ".\n";
                      my @to = (Param("maintainer"), $maintainer, $exporter);
                  ***************
                  *** 196,205 ****
                    
                    my $exporterid = DBname_to_id($exporter);
                    if ( ! $exporterid ) {
                  !   my $subject = "Bug import error: invalid exporter";
                      my $message = "The user <$tree->[1][0]->{'exporter'}> who tried to move\n";
                  !   $message .= "bugs here does not have an account in this database.\n";
                  !   $message .= "\n\nPlease re-open the original bug.\n";
                      $message .= "\n\n$xml";
                      my @to = (Param("maintainer"), $maintainer, $exporter);
                      MailMessage ($subject, $message, @to);
                  --- 196,205 ----
                    
                    my $exporterid = DBname_to_id($exporter);
                    if ( ! $exporterid ) {
                  !   my $subject = "Issue import error: invalid exporter";
                      my $message = "The user <$tree->[1][0]->{'exporter'}> who tried to move\n";
                  !   $message .= "issues here does not have an account in this database.\n";
                  !   $message .= "\n\nPlease re-open the original issue.\n";
                      $message .= "\n\n$xml";
                      my @to = (Param("maintainer"), $maintainer, $exporter);
                      MailMessage ($subject, $message, @to);
                  ***************
                  *** 210,218 ****
                    if (defined $tree->[1][0]->{'urlbase'}) {
                      $urlbase= $tree->[1][0]->{'urlbase'}; 
                    } else {
                  !   my $subject = "Bug import error: invalid exporting database";
                  !   my $message = "Cannot import these bugs because the name of the exporting db was not given.\n";
                  !   $message .= "\n\nPlease re-open the original bug.\n";
                      $message .= "\n\n$xml";
                      my @to = (Param("maintainer"), $maintainer, $exporter);
                      MailMessage ($subject, $message, @to);
                  --- 210,218 ----
                    if (defined $tree->[1][0]->{'urlbase'}) {
                      $urlbase= $tree->[1][0]->{'urlbase'}; 
                    } else {
                  !   my $subject = "Issue import error: invalid exporting database";
                  !   my $message = "Cannot import these issues because the name of the exporting db was not given.\n";
                  !   $message .= "\n\nPlease re-open the original issue.\n";
                      $message .= "\n\n$xml";
                      my @to = (Param("maintainer"), $maintainer, $exporter);
                      MailMessage ($subject, $message, @to);
                  ***************
                  *** 220,240 ****
                    }
                      
                    
                  ! my $bugqty = ($#{@{$tree}->[1]} +1 -3) / 4;
                  ! my $log = "Imported $bugqty bug(s) from $urlbase,\n  sent by $exporter.\n\n";
                  ! for (my $k=1 ; $k <= $bugqty ; $k++) {
                      my $cur = $k*4;
                    
                      if (defined $tree->[1][$cur][0]->{'error'}) {
                  !     $log .= "\nError in bug $tree->[1][$cur][4][2]\@$urlbase:";
                        $log .= " $tree->[1][$cur][0]->{'error'}\n";
                        if ($tree->[1][$cur][0]->{'error'} =~ /NotFound/) {
                  !       $log .= "$exporter tried to move bug $tree->[1][$cur][4][2] here";
                  !       $log .= " but $urlbase reports that this bug does not exist.\n"; 
                        } elsif ( $tree->[1][$cur][0]->{'error'} =~ /NotPermitted/) {
                  !       $log .= "$exporter tried to move bug $tree->[1][$cur][4][2] here";
                          $log .= " but $urlbase reports that $exporter does not have access";
                  !       $log .= " to that bug.\n";
                        }
                        next;
                      }
                  --- 220,240 ----
                    }
                      
                    
                  ! my $issueqty = ($#{@{$tree}->[1]} +1 -3) / 4;
                  ! my $log = "Imported $issueqty issue(s) from $urlbase,\n  sent by $exporter.\n\n";
                  ! for (my $k=1 ; $k <= $issueqty ; $k++) {
                      my $cur = $k*4;
                    
                      if (defined $tree->[1][$cur][0]->{'error'}) {
                  !     $log .= "\nError in issue $tree->[1][$cur][4][2]\@$urlbase:";
                        $log .= " $tree->[1][$cur][0]->{'error'}\n";
                        if ($tree->[1][$cur][0]->{'error'} =~ /NotFound/) {
                  !       $log .= "$exporter tried to move issue $tree->[1][$cur][4][2] here";
                  !       $log .= " but $urlbase reports that this issue does not exist.\n"; 
                        } elsif ( $tree->[1][$cur][0]->{'error'} =~ /NotPermitted/) {
                  !       $log .= "$exporter tried to move issue $tree->[1][$cur][4][2] here";
                          $log .= " but $urlbase reports that $exporter does not have access";
                  !       $log .= " to that issue.\n";
                        }
                        next;
                      }
                  ***************
                  *** 244,272 ****
                        $multiple_fields{$field} = "x"; 
                      }
                      my %all_fields;
                  !   foreach my $field (qw (dependson product bug_status priority cc version 
                  !       bug_id rep_platform short_desc assigned_to bug_file_loc resolution
                  !       delta_ts component reporter urlbase target_milestone bug_severity 
                          creation_ts qa_contact keywords status_whiteboard op_sys blocks)) {
                        $all_fields{$field} = "x"; 
                      }
                     
                     
                  !   my %bug_fields;
                      my $err = "";
                      for (my $i=3 ; $i < $#{@{$tree}->[1][$cur]} ; $i=$i+4) {
                        if (defined $multiple_fields{$tree->[1][$cur][$i]}) {
                  !       if (defined $bug_fields{$tree->[1][$cur][$i]}) {
                  !         $bug_fields{$tree->[1][$cur][$i]} .= " " .  $tree->[1][$cur][$i+1][2];
                          } else {
                  !         $bug_fields{$tree->[1][$cur][$i]} = $tree->[1][$cur][$i+1][2];
                          }
                        } elsif (defined $all_fields{$tree->[1][$cur][$i]}) {
                  !       $bug_fields{$tree->[1][$cur][$i]} = $tree->[1][$cur][$i+1][2];
                        } else {
                          $err .= "---\n";
                  !       $err .= "Unknown bug field \"$tree->[1][$cur][$i]\"";
                  !       $err .= " encountered while moving bug\n";
                          $err .= "<$tree->[1][$cur][$i]>";
                          if (defined $tree->[1][$cur][$i+1][3]) {
                            $err .= "\n";
                  --- 244,272 ----
                        $multiple_fields{$field} = "x"; 
                      }
                      my %all_fields;
                  !   foreach my $field (qw (dependson product issue_status priority cc version 
                  !       issue_id rep_platform short_desc assigned_to issue_file_loc resolution
                  !       delta_ts component reporter urlbase target_milestone issue_type 
                          creation_ts qa_contact keywords status_whiteboard op_sys blocks)) {
                        $all_fields{$field} = "x"; 
                      }
                     
                     
                  !   my %issue_fields;
                      my $err = "";
                      for (my $i=3 ; $i < $#{@{$tree}->[1][$cur]} ; $i=$i+4) {
                        if (defined $multiple_fields{$tree->[1][$cur][$i]}) {
                  !       if (defined $issue_fields{$tree->[1][$cur][$i]}) {
                  !         $issue_fields{$tree->[1][$cur][$i]} .= " " .  $tree->[1][$cur][$i+1][2];
                          } else {
                  !         $issue_fields{$tree->[1][$cur][$i]} = $tree->[1][$cur][$i+1][2];
                          }
                        } elsif (defined $all_fields{$tree->[1][$cur][$i]}) {
                  !       $issue_fields{$tree->[1][$cur][$i]} = $tree->[1][$cur][$i+1][2];
                        } else {
                          $err .= "---\n";
                  !       $err .= "Unknown issue field \"$tree->[1][$cur][$i]\"";
                  !       $err .= " encountered while moving issue\n";
                          $err .= "<$tree->[1][$cur][$i]>";
                          if (defined $tree->[1][$cur][$i+1][3]) {
                            $err .= "\n";
                  ***************
                  *** 287,293 ****
                        if ($tree->[1][$cur][$i] =~ /long_desc/) {
                          my %long_desc;
                          $long_desc{'who'} = $tree->[1][$cur][$i+1][4][2];
                  !       $long_desc{'bug_when'} = $tree->[1][$cur][$i+1][8][2];
                          $long_desc{'thetext'} = $tree->[1][$cur][$i+1][12][2];
                          push @long_descs, \%long_desc;
                        }
                  --- 287,293 ----
                        if ($tree->[1][$cur][$i] =~ /long_desc/) {
                          my %long_desc;
                          $long_desc{'who'} = $tree->[1][$cur][$i+1][4][2];
                  !       $long_desc{'issue_when'} = $tree->[1][$cur][$i+1][8][2];
                          $long_desc{'thetext'} = $tree->[1][$cur][$i+1][12][2];
                          push @long_descs, \%long_desc;
                        }
                  ***************
                  *** 296,311 ****
                      # instead of giving each comment its own item in the longdescs
                      # table like it should have, lets cat them all into one big
                      # comment otherwise we would have to lie often about who
                  !   # authored the comment since commenters in one bugzilla probably
                      # don't have accounts in the other one.
                  !   sub by_date {my @a; my @b; $a->{'bug_when'} cmp $b->{'bug_when'}; }
                      my @sorted_descs = sort by_date @long_descs;
                      my $long_description = "";
                      for (my $z=0 ; $z <= $#sorted_descs ; $z++) {
                        unless ( $z==0 ) {
                          $long_description .= "\n\n\n------- Additional Comments From ";
                          $long_description .= "$sorted_descs[$z]->{'who'} "; 
                  !       $long_description .= "$sorted_descs[$z]->{'bug_when'}"; 
                          $long_description .= " ----\n\n";
                        }
                        $long_description .=  UnQuoteXMLChars($sorted_descs[$z]->{'thetext'});
                  --- 296,311 ----
                      # instead of giving each comment its own item in the longdescs
                      # table like it should have, lets cat them all into one big
                      # comment otherwise we would have to lie often about who
                  !   # authored the comment since commenters in one issuezilla probably
                      # don't have accounts in the other one.
                  !   sub by_date {my @a; my @b; $a->{'issue_when'} cmp $b->{'issue_when'}; }
                      my @sorted_descs = sort by_date @long_descs;
                      my $long_description = "";
                      for (my $z=0 ; $z <= $#sorted_descs ; $z++) {
                        unless ( $z==0 ) {
                          $long_description .= "\n\n\n------- Additional Comments From ";
                          $long_description .= "$sorted_descs[$z]->{'who'} "; 
                  !       $long_description .= "$sorted_descs[$z]->{'issue_when'}"; 
                          $long_description .= " ----\n\n";
                        }
                        $long_description .=  UnQuoteXMLChars($sorted_descs[$z]->{'thetext'});
                  ***************
                  *** 314,352 ****
                    
                      my $comments;
                    
                  !   $comments .= "\n\n------- Bug moved to this database by $exporter "; 
                      $comments .= time2str("%Y-%m-%d %H:%M", time);
                      $comments .= " -------\n\n";
                  !   $comments .= "This bug previously known as bug $bug_fields{'bug_id'} at ";
                      $comments .= $urlbase . "\n";
                      $comments .= $urlbase . "show_bug.cgi?";
                  !   $comments .= "id=" . $bug_fields{'bug_id'} . "\n";
                  !   $comments .= "Originally filed under the $bug_fields{'product'} ";
                  !   $comments .= "product and $bug_fields{'component'} component.\n";
                  !   if (defined $bug_fields{'dependson'}) {
                  !     $comments .= "Bug depends on bug(s) $bug_fields{'dependson'}.\n";
                      }
                  !   if (defined $bug_fields{'blocks'}) {
                  !   $comments .= "Bug blocks bug(s) $bug_fields{'blocks'}.\n";
                      }
                    
                      my @query = ();
                      my @values = ();
                      foreach my $field ( qw(creation_ts delta_ts status_whiteboard) ) {
                  !       if ( (defined $bug_fields{$field}) && ($bug_fields{$field}) ){
                            push (@query, "$field");
                  !         push (@values, SqlQuote($bug_fields{$field}));
                          }
                      }
                    
                  !   if ( (defined $bug_fields{'bug_file_loc'}) && ($bug_fields{'bug_file_loc'}) ){
                  !       push (@query, "bug_file_loc");
                  !       push (@values, SqlQuote(UnQuoteXMLChars($bug_fields{'bug_file_loc'})));
                          }
                    
                  !   if ( (defined $bug_fields{'short_desc'}) && ($bug_fields{'short_desc'}) ){
                          push (@query, "short_desc");
                  !       push (@values, SqlQuote(UnQuoteXMLChars($bug_fields{'short_desc'})) );
                          }
                    
                    
                  --- 314,352 ----
                    
                      my $comments;
                    
                  !   $comments .= "\n\n------- Issue moved to this database by $exporter "; 
                      $comments .= time2str("%Y-%m-%d %H:%M", time);
                      $comments .= " -------\n\n";
                  !   $comments .= "This issue previously known as issue $issue_fields{'issue_id'} at ";
                      $comments .= $urlbase . "\n";
                      $comments .= $urlbase . "show_bug.cgi?";
                  !   $comments .= "id=" . $issue_fields{'issue_id'} . "\n";
                  !   $comments .= "Originally filed under the $issue_fields{'product'} ";
                  !   $comments .= "product and $issue_fields{'component'} component.\n";
                  !   if (defined $issue_fields{'dependson'}) {
                  !     $comments .= "Issue depends on issue(s) $issue_fields{'dependson'}.\n";
                      }
                  !   if (defined $issue_fields{'blocks'}) {
                  !   $comments .= "Issue blocks issue(s) $issue_fields{'blocks'}.\n";
                      }
                    
                      my @query = ();
                      my @values = ();
                      foreach my $field ( qw(creation_ts delta_ts status_whiteboard) ) {
                  !       if ( (defined $issue_fields{$field}) && ($issue_fields{$field}) ){
                            push (@query, "$field");
                  !         push (@values, SqlQuote($issue_fields{$field}));
                          }
                      }
                    
                  !   if ( (defined $issue_fields{'issue_file_loc'}) && ($issue_fields{'issue_file_loc'}) ){
                  !       push (@query, "issue_file_loc");
                  !       push (@values, SqlQuote(UnQuoteXMLChars($issue_fields{'issue_file_loc'})));
                          }
                    
                  !   if ( (defined $issue_fields{'short_desc'}) && ($issue_fields{'short_desc'}) ){
                          push (@query, "short_desc");
                  !       push (@values, SqlQuote(UnQuoteXMLChars($issue_fields{'short_desc'})) );
                          }
                    
                    
                  ***************
                  *** 354,363 ****
                      my $comp;
                      my $default_prod = Param("moved-default-product");
                      my $default_comp = Param("moved-default-component");
                  !   if ( (defined ($bug_fields{'product'})) &&
                  !        (defined ($bug_fields{'component'})) ) {
                  !      $prod = $bug_fields{'product'};
                  !      $comp = $bug_fields{'component'};
                      } else {
                         $prod = $default_prod;
                         $comp = $default_comp;
                  --- 354,363 ----
                      my $comp;
                      my $default_prod = Param("moved-default-product");
                      my $default_comp = Param("moved-default-component");
                  !   if ( (defined ($issue_fields{'product'})) &&
                  !        (defined ($issue_fields{'component'})) ) {
                  !      $prod = $issue_fields{'product'};
                  !      $comp = $issue_fields{'component'};
                      } else {
                         $prod = $default_prod;
                         $comp = $default_comp;
                  ***************
                  *** 378,389 ****
                        push (@query, "component");
                        push (@values, SqlQuote($component[0]) );
                      } else {
                  !     my $subject = "Bug import error: invalid default product or component";
                  !     my $message = "Cannot import these bugs because an invalid default ";
                        $message .= "product and/or component was defined for the target db.\n";
                        $message .= Param("maintainer") . " needs to fix the definitions of ";
                        $message .= "moved-default-product and moved-default-component.\n";
                  !     $message .= "\n\nPlease re-open the original bug.\n";
                        $message .= "\n\n$xml";
                        my @to = (Param("maintainer"), $maintainer, $exporter);
                        MailMessage ($subject, $message, @to);
                  --- 378,389 ----
                        push (@query, "component");
                        push (@values, SqlQuote($component[0]) );
                      } else {
                  !     my $subject = "Issue import error: invalid default product or component";
                  !     my $message = "Cannot import these issues because an invalid default ";
                        $message .= "product and/or component was defined for the target db.\n";
                        $message .= Param("maintainer") . " needs to fix the definitions of ";
                        $message .= "moved-default-product and moved-default-component.\n";
                  !     $message .= "\n\nPlease re-open the original issue.\n";
                        $message .= "\n\n$xml";
                        my @to = (Param("maintainer"), $maintainer, $exporter);
                        MailMessage ($subject, $message, @to);
                  ***************
                  *** 391,447 ****
                      }
                    
                      if (defined  ($::versions{$product[0]} ) &&
                  !      (my @version = grep /^$bug_fields{'version'}$/i, 
                                             @{$::versions{$product[0]}}) ){
                        push (@values, SqlQuote($version[0]) );
                        push (@query, "version");
                      } else {
                        push (@query, "version");
                        push (@values, SqlQuote(@{$::versions{$product[0]}}->[0]));
                  !     $err .= "Unknown version $bug_fields{'version'} in product $product[0]. ";
                        $err .= "Setting version to \"@{$::versions{$product[0]}}->[0]\".\n";
                      }
                    
                  !   if (defined ($bug_fields{'priority'}) &&
                  !        (my @priority = grep /^$bug_fields{'priority'}$/i, @::legal_priority) ){
                        push (@values, SqlQuote($priority[0]) );
                        push (@query, "priority");
                      } else {
                        push (@values, SqlQuote("P3"));
                        push (@query, "priority");
                        $err .= "Unknown priority ";
                  !     $err .= (defined $bug_fields{'priority'})?$bug_fields{'priority'}:"unknown";
                        $err .= ". Setting to default priority \"P3\".\n";
                      }
                    
                  !   if (defined ($bug_fields{'rep_platform'}) &&
                  !        (my @platform = grep /^$bug_fields{'rep_platform'}$/i, @::legal_platform) ){
                        push (@values, SqlQuote($platform[0]) );
                        push (@query, "rep_platform");
                      } else {
                        push (@values, SqlQuote("Other") );
                        push (@query, "rep_platform");
                        $err .= "Unknown platform ";
                  !     $err .= (defined $bug_fields{'rep_platform'})?
                  !                      $bug_fields{'rep_platform'}:"unknown";
                        $err .= ". Setting to default platform \"Other\".\n";
                      }
                    
                  !   if (defined ($bug_fields{'op_sys'}) &&
                  !      (my @opsys = grep /^$bug_fields{'op_sys'}$/i, @::legal_opsys) ){
                        push (@values, SqlQuote($opsys[0]) );
                        push (@query, "op_sys");
                      } else {
                        push (@values, SqlQuote("other"));
                        push (@query, "op_sys");
                        $err .= "Unknown operating system ";
                  !     $err .= (defined $bug_fields{'op_sys'})?$bug_fields{'op_sys'}:"unknown";
                        $err .= ". Setting to default OS \"other\".\n";
                      }
                    
                      if (Param("usetargetmilestone")) {
                        if (defined  ($::target_milestone{$product[0]} ) &&
                  !        (my @tm = grep /^$bug_fields{'target_milestone'}$/i, 
                                           @{$::target_milestone{$product[0]}}) ){
                          push (@values, SqlQuote($tm[0]) );
                          push (@query, "target_milestone");
                  --- 391,447 ----
                      }
                    
                      if (defined  ($::versions{$product[0]} ) &&
                  !      (my @version = grep /^$issue_fields{'version'}$/i, 
                                             @{$::versions{$product[0]}}) ){
                        push (@values, SqlQuote($version[0]) );
                        push (@query, "version");
                      } else {
                        push (@query, "version");
                        push (@values, SqlQuote(@{$::versions{$product[0]}}->[0]));
                  !     $err .= "Unknown version $issue_fields{'version'} in product $product[0]. ";
                        $err .= "Setting version to \"@{$::versions{$product[0]}}->[0]\".\n";
                      }
                    
                  !   if (defined ($issue_fields{'priority'}) &&
                  !        (my @priority = grep /^$issue_fields{'priority'}$/i, @::legal_priority) ){
                        push (@values, SqlQuote($priority[0]) );
                        push (@query, "priority");
                      } else {
                        push (@values, SqlQuote("P3"));
                        push (@query, "priority");
                        $err .= "Unknown priority ";
                  !     $err .= (defined $issue_fields{'priority'})?$issue_fields{'priority'}:"unknown";
                        $err .= ". Setting to default priority \"P3\".\n";
                      }
                    
                  !   if (defined ($issue_fields{'rep_platform'}) &&
                  !        (my @platform = grep /^$issue_fields{'rep_platform'}$/i, @::legal_platform) ){
                        push (@values, SqlQuote($platform[0]) );
                        push (@query, "rep_platform");
                      } else {
                        push (@values, SqlQuote("Other") );
                        push (@query, "rep_platform");
                        $err .= "Unknown platform ";
                  !     $err .= (defined $issue_fields{'rep_platform'})?
                  !                      $issue_fields{'rep_platform'}:"unknown";
                        $err .= ". Setting to default platform \"Other\".\n";
                      }
                    
                  !   if (defined ($issue_fields{'op_sys'}) &&
                  !      (my @opsys = grep /^$issue_fields{'op_sys'}$/i, @::legal_opsys) ){
                        push (@values, SqlQuote($opsys[0]) );
                        push (@query, "op_sys");
                      } else {
                        push (@values, SqlQuote("other"));
                        push (@query, "op_sys");
                        $err .= "Unknown operating system ";
                  !     $err .= (defined $issue_fields{'op_sys'})?$issue_fields{'op_sys'}:"unknown";
                        $err .= ". Setting to default OS \"other\".\n";
                      }
                    
                      if (Param("usetargetmilestone")) {
                        if (defined  ($::target_milestone{$product[0]} ) &&
                  !        (my @tm = grep /^$issue_fields{'target_milestone'}$/i, 
                                           @{$::target_milestone{$product[0]}}) ){
                          push (@values, SqlQuote($tm[0]) );
                          push (@query, "target_milestone");
                  ***************
                  *** 452,563 ****
                          push (@values, SqlQuote($tm));
                          push (@query, "target_milestone");
                          $err .= "Unknown milestone \"";
                  !       $err .= (defined $bug_fields{'target_milestone'})?
                  !               $bug_fields{'target_milestone'}:"unknown";
                          $err .= "\" in product \"$product[0]\".\n";
                          $err .= "   Setting to default milestone for this product, ";
                          $err .= "\'" . $tm . "\'\n";
                        }
                      }
                    
                  !   if (defined ($bug_fields{'bug_severity'}) &&
                  !        (my @severity= grep /^$bug_fields{'bug_severity'}$/i, 
                  !                            @::legal_severity) ){
                  !     push (@values, SqlQuote($severity[0]) );
                  !     push (@query, "bug_severity");
                      } else {
                  !     push (@values, SqlQuote("normal"));
                  !     push (@query, "bug_severity");
                  !     $err .= "Unknown severity ";
                  !     $err .= (defined $bug_fields{'bug_severity'})?
                  !                      $bug_fields{'bug_severity'}:"unknown";
                  !     $err .= ". Setting to default severity \"normal\".\n";
                      }
                    
                  !   my $reporterid = DBname_to_id($bug_fields{'reporter'});
                  !   if ( ($bug_fields{'reporter'}) && ( $reporterid ) ) {
                        push (@values, SqlQuote($reporterid));
                        push (@query, "reporter");
                      } else {
                        push (@values, SqlQuote($exporterid));
                        push (@query, "reporter");
                  !     $err .= "The original reporter of this bug does not have\n";
                        $err .= "   an account here. Reassigning to the person who moved\n";
                        $err .= "   it here, $exporter.\n";
                  !     if ( $bug_fields{'reporter'} ) {
                  !       $err .= "   Previous reporter was $bug_fields{'reporter'}.\n";
                        } else {
                          $err .= "   Previous reporter is unknown.\n";
                        }
                      }
                    
                      my $changed_owner = 0;
                  !   if ( ($bug_fields{'assigned_to'}) && 
                  !        ( DBname_to_id($bug_fields{'assigned_to'})) ) {
                  !     push (@values, SqlQuote(DBname_to_id($bug_fields{'assigned_to'})));
                        push (@query, "assigned_to");
                      } else {
                        push (@values, SqlQuote($exporterid) );
                        push (@query, "assigned_to");
                        $changed_owner = 1;
                  !     $err .= "The original owner of this bug does not have\n";
                        $err .= "   an account here. Reassigning to the person who moved\n";
                        $err .= "   it here, $exporter.\n";
                  !     if ( $bug_fields{'assigned_to'} ) {
                  !       $err .= "   Previous owner was $bug_fields{'assigned_to'}.\n";
                        } else {
                          $err .= "   Previous owner is unknown.\n";
                        }
                      }
                    
                      my @resolution;
                  !   if (defined ($bug_fields{'resolution'}) &&
                  !        (@resolution= grep /^$bug_fields{'resolution'}$/i, @::legal_resolution) ){
                        push (@values, SqlQuote($resolution[0]) );
                        push (@query, "resolution");
                  !   } elsif ( (defined $bug_fields{'resolution'}) && (!$resolution[0]) ){
                  !     $err .= "Unknown resolution \"$bug_fields{'resolution'}\".\n";
                      }
                    
                  !   # if the bug's owner changed, mark the bug NEW, unless a valid 
                  !   # resolution is set, which indicates that the bug should be closed.
                      #
                      if ( ($changed_owner) && (!$resolution[0]) ) {
                        push (@values, SqlQuote("NEW"));
                  !     push (@query, "bug_status");
                  !     $err .= "Bug assigned to new owner, setting status to \"NEW\".\n";
                        $err .= "   Previous status was \"";
                  !     $err .= (defined $bug_fields{'bug_status'})?
                  !                      $bug_fields{'bug_status'}:"unknown";
                        $err .= "\".\n";
                  !   } elsif ( (defined ($bug_fields{'resolution'})) && (!$resolution[0]) ){
                        #if the resolution was illegal then set status to NEW
                        push (@values, SqlQuote("NEW"));
                  !     push (@query, "bug_status");
                        $err .= "Resolution was invalid. Setting status to \"NEW\".\n";
                        $err .= "   Previous status was \"";
                  !     $err .= (defined $bug_fields{'bug_status'})?
                  !                      $bug_fields{'bug_status'}:"unknown";
                        $err .= "\".\n";
                  !   } elsif (defined ($bug_fields{'bug_status'}) &&
                  !        (my @status = grep /^$bug_fields{'bug_status'}$/i, @::legal_bug_status) ){
                  !     #if a bug status was set then use it, if its legal
                        push (@values, SqlQuote($status[0]));
                  !     push (@query, "bug_status");
                      } else {
                  !     # if all else fails, make the bug new
                        push (@values, SqlQuote("NEW"));
                  !     push (@query, "bug_status");
                        $err .= "Unknown status ";
                  !     $err .= (defined $bug_fields{'bug_status'})?
                  !                      $bug_fields{'bug_status'}:"unknown";
                        $err .= ". Setting to default status \"NEW\".\n";
                      }
                    
                      if (Param("useqacontact")) {
                        my $qa_contact;
                  !     if ( (defined $bug_fields{'qa_contact'}) &&
                  !          ($qa_contact  = DBname_to_id($bug_fields{'qa_contact'})) ){
                          push (@values, SqlQuote($qa_contact));
                          push (@query, "qa_contact");
                        } else {
                  --- 452,563 ----
                          push (@values, SqlQuote($tm));
                          push (@query, "target_milestone");
                          $err .= "Unknown milestone \"";
                  !       $err .= (defined $issue_fields{'target_milestone'})?
                  !               $issue_fields{'target_milestone'}:"unknown";
                          $err .= "\" in product \"$product[0]\".\n";
                          $err .= "   Setting to default milestone for this product, ";
                          $err .= "\'" . $tm . "\'\n";
                        }
                      }
                    
                  !   if (defined ($issue_fields{'issue_type'}) &&
                  !        (my @issue_type= grep /^$issue_fields{'issue_type'}$/i, 
                  !                            @::legal_issue_type) ){
                  !     push (@values, SqlQuote($issue_type[0]) );
                  !     push (@query, "issue_type");
                      } else {
                  !     push (@values, SqlQuote("DEFECT"));
                  !     push (@query, "issue_type");
                  !     $err .= "Unknown issue type ";
                  !     $err .= (defined $issue_fields{'issue_type'})?
                  !                      $issue_fields{'issue_type'}:"unknown";
                  !     $err .= ". Setting to default issue type \"DEFECT\".\n";
                      }
                    
                  !   my $reporterid = DBname_to_id($issue_fields{'reporter'});
                  !   if ( ($issue_fields{'reporter'}) && ( $reporterid ) ) {
                        push (@values, SqlQuote($reporterid));
                        push (@query, "reporter");
                      } else {
                        push (@values, SqlQuote($exporterid));
                        push (@query, "reporter");
                  !     $err .= "The original reporter of this issue does not have\n";
                        $err .= "   an account here. Reassigning to the person who moved\n";
                        $err .= "   it here, $exporter.\n";
                  !     if ( $issue_fields{'reporter'} ) {
                  !       $err .= "   Previous reporter was $issue_fields{'reporter'}.\n";
                        } else {
                          $err .= "   Previous reporter is unknown.\n";
                        }
                      }
                    
                      my $changed_owner = 0;
                  !   if ( ($issue_fields{'assigned_to'}) && 
                  !        ( DBname_to_id($issue_fields{'assigned_to'})) ) {
                  !     push (@values, SqlQuote(DBname_to_id($issue_fields{'assigned_to'})));
                        push (@query, "assigned_to");
                      } else {
                        push (@values, SqlQuote($exporterid) );
                        push (@query, "assigned_to");
                        $changed_owner = 1;
                  !     $err .= "The original owner of this issue does not have\n";
                        $err .= "   an account here. Reassigning to the person who moved\n";
                        $err .= "   it here, $exporter.\n";
                  !     if ( $issue_fields{'assigned_to'} ) {
                  !       $err .= "   Previous owner was $issue_fields{'assigned_to'}.\n";
                        } else {
                          $err .= "   Previous owner is unknown.\n";
                        }
                      }
                    
                      my @resolution;
                  !   if (defined ($issue_fields{'resolution'}) &&
                  !        (@resolution= grep /^$issue_fields{'resolution'}$/i, @::legal_resolution) ){
                        push (@values, SqlQuote($resolution[0]) );
                        push (@query, "resolution");
                  !   } elsif ( (defined $issue_fields{'resolution'}) && (!$resolution[0]) ){
                  !     $err .= "Unknown resolution \"$issue_fields{'resolution'}\".\n";
                      }
                    
                  !   # if the issue's owner changed, mark the issue NEW, unless a valid 
                  !   # resolution is set, which indicates that the issue should be closed.
                      #
                      if ( ($changed_owner) && (!$resolution[0]) ) {
                        push (@values, SqlQuote("NEW"));
                  !     push (@query, "issue_status");
                  !     $err .= "Issue assigned to new owner, setting status to \"NEW\".\n";
                        $err .= "   Previous status was \"";
                  !     $err .= (defined $issue_fields{'issue_status'})?
                  !                      $issue_fields{'issue_status'}:"unknown";
                        $err .= "\".\n";
                  !   } elsif ( (defined ($issue_fields{'resolution'})) && (!$resolution[0]) ){
                        #if the resolution was illegal then set status to NEW
                        push (@values, SqlQuote("NEW"));
                  !     push (@query, "issue_status");
                        $err .= "Resolution was invalid. Setting status to \"NEW\".\n";
                        $err .= "   Previous status was \"";
                  !     $err .= (defined $issue_fields{'issue_status'})?
                  !                      $issue_fields{'issue_status'}:"unknown";
                        $err .= "\".\n";
                  !   } elsif (defined ($issue_fields{'issue_status'}) &&
                  !        (my @status = grep /^$issue_fields{'issue_status'}$/i, @::legal_issue_status) ){
                  !     #if an issue status was set then use it, if its legal
                        push (@values, SqlQuote($status[0]));
                  !     push (@query, "issue_status");
                      } else {
                  !     # if all else fails, make the issue new
                        push (@values, SqlQuote("NEW"));
                  !     push (@query, "issue_status");
                        $err .= "Unknown status ";
                  !     $err .= (defined $issue_fields{'issue_status'})?
                  !                      $issue_fields{'issue_status'}:"unknown";
                        $err .= ". Setting to default status \"NEW\".\n";
                      }
                    
                      if (Param("useqacontact")) {
                        my $qa_contact;
                  !     if ( (defined $issue_fields{'qa_contact'}) &&
                  !          ($qa_contact  = DBname_to_id($issue_fields{'qa_contact'})) ){
                          push (@values, SqlQuote($qa_contact));
                          push (@query, "qa_contact");
                        } else {
                  ***************
                  *** 568,579 ****
                          push (@values, SqlQuote(DBname_to_id($qa_contact)) );
                          push (@query, "qa_contact");
                          $err .= "Setting qa contact to the default for this product.\n";
                  !       $err .= "   This bug either had no qa contact or an invalid one.\n";
                        }
                      }
                    
                    
                  !   my $query  = "INSERT INTO bugs (\n" 
                                   . join (",\n", @query)
                                   . "\n) VALUES (\n"
                                   . join (",\n", @values)
                  --- 568,579 ----
                          push (@values, SqlQuote(DBname_to_id($qa_contact)) );
                          push (@query, "qa_contact");
                          $err .= "Setting qa contact to the default for this product.\n";
                  !       $err .= "   This issue either had no qa contact or an invalid one.\n";
                        }
                      }
                    
                    
                  !   my $query  = "INSERT INTO issues (\n" 
                                   . join (",\n", @query)
                                   . "\n) VALUES (\n"
                                   . join (",\n", @values)
                  ***************
                  *** 582,599 ****
                      SendSQL("select LAST_INSERT_ID()");
                      my $id = FetchOneColumn();
                    
                  !   if (defined $bug_fields{'cc'}) {
                  !     foreach my $person (split(/[ ,]/, $bug_fields{'cc'})) {
                          my $uid;
                          if ( ($person ne "") && ($uid = DBname_to_id($person)) ) {
                  !         SendSQL("insert into cc (bug_id, who) values ($id, " . SqlQuote($uid) .")");
                          }
                        }
                      }
                    
                  !   if (defined ($bug_fields{'keywords'})) {
                        my %keywordseen;
                  !     foreach my $keyword (split(/[\s,]+/, $bug_fields{'keywords'})) {
                          if ($keyword eq '') {
                            next;
                          }
                  --- 582,599 ----
                      SendSQL("select LAST_INSERT_ID()");
                      my $id = FetchOneColumn();
                    
                  !   if (defined $issue_fields{'cc'}) {
                  !     foreach my $person (split(/[ ,]/, $issue_fields{'cc'})) {
                          my $uid;
                          if ( ($person ne "") && ($uid = DBname_to_id($person)) ) {
                  !         SendSQL("insert into cc (issue_id, who) values ($id, " . SqlQuote($uid) .")");
                          }
                        }
                      }
                    
                  !   if (defined ($issue_fields{'keywords'})) {
                        my %keywordseen;
                  !     foreach my $keyword (split(/[\s,]+/, $issue_fields{'keywords'})) {
                          if ($keyword eq '') {
                            next;
                          }
                  ***************
                  *** 603,609 ****
                            next;
                          }
                          if (!$keywordseen{$i}) {
                  !         SendSQL("INSERT INTO keywords (bug_id, keywordid) VALUES ($id, $i)");
                            $keywordseen{$i} = 1;
                          }
                        }
                  --- 603,609 ----
                            next;
                          }
                          if (!$keywordseen{$i}) {
                  !         SendSQL("INSERT INTO keywords (issue_id, keywordid) VALUES ($id, $i)");
                            $keywordseen{$i} = 1;
                          }
                        }
                  ***************
                  *** 614,628 ****
                        $long_description .= "\n$err\n";
                      }
                    
                  !   SendSQL("INSERT INTO longdescs (bug_id, who, bug_when, thetext) VALUES " .
                        "($id, $exporterid, now(), " . SqlQuote($long_description) . ")");
                    
                  !   $log .= "Bug $urlbase/show_bug.cgi?id=$bug_fields{'bug_id'} ";
                  !   $log .= "imported as bug $id.\n";
                      $log .= Param("urlbase") . "/show_bug.cgi?id=$id\n\n";
                      if ($err) {
                  !     $log .= "The following problems were encountered creating bug $id.\n";
                  !     $log .= "You may have to set certain fields in the new bug by hand.\n\n";
                        $log .= $err;
                        $log .= "\n\n\n";
                      }
                  --- 614,628 ----
                        $long_description .= "\n$err\n";
                      }
                    
                  !   SendSQL("INSERT INTO longdescs (issue_id, who, issue_when, thetext) VALUES " .
                        "($id, $exporterid, now(), " . SqlQuote($long_description) . ")");
                    
                  !   $log .= "Issue $urlbase/show_bug.cgi?id=$issue_fields{'issue_id'} ";
                  !   $log .= "imported as issue $id.\n";
                      $log .= Param("urlbase") . "/show_bug.cgi?id=$id\n\n";
                      if ($err) {
                  !     $log .= "The following problems were encountered creating issue $id.\n";
                  !     $log .= "You may have to set certain fields in the new issue by hand.\n\n";
                        $log .= $err;
                        $log .= "\n\n\n";
                      }
                  ***************
                  *** 630,636 ****
                      system("./processmail", $id, $exporter);
                    }
                    
                  ! my $subject = "$bugqty bug(s) successfully moved from $urlbase to " 
                                   . Param("urlbase") ;
                    my @to = ($exporter);
                    MailMessage ($subject, $log, @to);
                  --- 630,636 ----
                      system("./processmail", $id, $exporter);
                    }
                    
                  ! my $subject = "$issueqty issue(s) successfully moved from $urlbase to " 
                                   . Param("urlbase") ;
                    my @to = ($exporter);
                    MailMessage ($subject, $log, @to);
                  Index: index.html
                  ===================================================================
                  RCS file: /cvsroot/mozilla/webtools/bugzilla/index.html,v
                  retrieving revision 1.11
                  diff -c -r1.11 index.html
                  *** index.html	2000/01/27 00:56:33	1.11
                  --- index.html	2000/09/29 04:57:12
                  ***************
                  *** 11,17 ****
                         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
                  --- 11,17 ----
                         implied. See the License for the specific language governing
                         rights and limitations under the License.
                        
                  !      The Original Code is the Issuezilla issue Tracking System.
                        
                         The Initial Developer of the Original Code is Netscape Communications
                         Corporation. Portions created by Netscape are
                  ***************
                  *** 22,34 ****
                    
                         Contributor(s): Terry Weissman 
                    -->
                  ! Bugzilla Main Page
                    
                  - 
                  - 
                  --- 22,30 ---- Contributor(s): Terry Weissman --> ! Issuezilla Main Page
                  *************** *** 50,83 **** !
                  ! ! This is Bugzilla: the Mozilla bug system. For more ! information about what Bugzilla is and what it can do, see ! mozilla.org's ! bug pages. !
                  ! ! - - This is where we put in lots of nifty words explaining all about - bugzilla. -

                  ! ! But it all boils down to a choice of: !
                  ! Query existing bug reports
                  ! Enter a new bug report
                  Get summary reports

                  ! Open a new Bugzilla account
                  Forget the currently stored login
                  Change password or user preferences

                  ! bug #
                  --- 46,71 ----
                  ! This is IssueZilla: the Collabnet issue tracking system, ! based on Bugzilla. ! IssueZilla is an interim attempt at doing generalized issue ! tracking by turning a bug-tracking system into an issue tracking ! system. !
                  !

                  ! Query existing issue reports
                  ! Enter a new issue report
                  Get summary reports

                  ! Open a new Issuezilla account
                  Forget the currently stored login
                  Change password or user preferences

                  ! issue #
                  Index: long_list.cgi =================================================================== RCS file: /cvsroot/mozilla/webtools/bugzilla/long_list.cgi,v retrieving revision 1.15 diff -c -r1.15 long_list.cgi *** long_list.cgi 2000/08/07 22:59:55 1.15 --- long_list.cgi 2000/09/29 04:57:12 *************** *** 1,4 **** ! #!/usr/bonsaitools/bin/perl -w # -*- Mode: perl; indent-tabs-mode: nil -*- # # The contents of this file are subject to the Mozilla Public --- 1,4 ---- ! #!/usr/bin/perl -w # -*- Mode: perl; indent-tabs-mode: nil -*- # # The contents of this file are subject to the Mozilla Public *************** *** 11,17 **** # 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 --- 11,17 ---- # implied. See the License for the specific language governing # rights and limitations under the License. # ! # The Original Code is the Issuezilla Issue Tracking System. # # The Initial Developer of the Original Code is Netscape Communications # Corporation. Portions created by Netscape are *************** *** 39,46 **** print "Content-type: text/html\n"; #Changing attachment to inline to resolve 46897 #zach@zachlipton.com ! print "Content-disposition: inline; filename=bugzilla_bug_list.html\n\n"; ! PutHeader ("Full Text Bug Listing"); ConnectToDatabase(); quietly_check_login(); --- 39,46 ---- print "Content-type: text/html\n"; #Changing attachment to inline to resolve 46897 #zach@zachlipton.com ! print "Content-disposition: inline; filename=issuezilla_issue_list.html\n\n"; ! PutHeader ("Full Text Issue Listing"); ConnectToDatabase(); quietly_check_login(); *************** *** 49,83 **** my $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.bug_file_loc, ! bugs.short_desc, ! bugs.target_milestone, ! bugs.qa_contact, ! bugs.status_whiteboard, ! bugs.keywords ! from bugs,profiles assign,profiles report ! where assign.userid = bugs.assigned_to and report.userid = bugs.reporter and ! bugs.groupset & $::usergroupset = bugs.groupset and"; ! ! $::FORM{'buglist'} = "" unless exists $::FORM{'buglist'}; ! foreach my $bug (split(/:/, $::FORM{'buglist'})) { ! SendSQL("$generic_query bugs.bug_id = $bug"); my @row; if (@row = FetchSQLData()) { ! my ($id, $product, $version, $platform, $opsys, $status, $severity, $priority, $resolution, $assigned, $reporter, $component, $url, $shortdesc, $target_milestone, $qa_contact, $status_whiteboard, $keywords) = (@row); --- 49,83 ---- my $generic_query = " select ! issues.issue_id, ! issues.product, ! issues.version, ! issues.rep_platform, ! issues.op_sys, ! issues.issue_status, ! issues.issue_type, ! issues.priority, ! issues.resolution, assign.login_name, report.login_name, ! issues.component, ! issues.issue_file_loc, ! issues.short_desc, ! issues.target_milestone, ! issues.qa_contact, ! issues.status_whiteboard, ! issues.keywords ! from issues,profiles assign,profiles report ! where assign.userid = issues.assigned_to and report.userid = issues.reporter and ! issues.groupset & $::usergroupset = issues.groupset and"; ! ! $::FORM{'issuelist'} = "" unless exists $::FORM{'issuelist'}; ! foreach my $issue (split(/:/, $::FORM{'issuelist'})) { ! SendSQL("$generic_query issues.issue_id = $issue"); my @row; if (@row = FetchSQLData()) { ! my ($id, $product, $version, $platform, $opsys, $status, $issue_type, $priority, $resolution, $assigned, $reporter, $component, $url, $shortdesc, $target_milestone, $qa_contact, $status_whiteboard, $keywords) = (@row); *************** *** 86,98 **** print "
                  " . html_quote($shortdesc) . "
                  \n"; ! print "Bug#: $id\n"; print "Product: $product\n"; print "Version: $version\n"; print "Platform: $platform\n"; print "OS/Version: $opsys\n"; print "Status: $status\n"; ! print "Severity: $severity\n"; print "Priority: $priority\n"; print "Resolution: $resolution\n"; print "Assigned To: $assigned\n"; --- 86,98 ---- print "
                  " . html_quote($shortdesc) . "
                  \n"; ! print "Issue#: $id\n"; print "Product: $product\n"; print "Version: $version\n"; print "Platform: $platform\n"; print "OS/Version: $opsys\n"; print "Status: $status\n"; ! print "Issue type: $issue_type\n"; print "Priority: $priority\n"; print "Resolution: $resolution\n"; print "Assigned To: $assigned\n"; *************** *** 119,125 **** html_quote($status_whiteboard) . "\n"; } print "Description:\n\n"; ! print GetLongDescriptionAsHTML($bug); print "
                  \n"; } } --- 119,125 ---- html_quote($status_whiteboard) . "\n"; } print "Description:\n\n"; ! print GetLongDescriptionAsHTML($issue); print "
                  \n"; } } Index: move.pl =================================================================== RCS file: /cvsroot/mozilla/webtools/bugzilla/move.pl,v retrieving revision 1.3 diff -c -r1.3 move.pl *** move.pl 2000/07/13 23:12:51 1.3 --- move.pl 2000/09/29 04:57:12 *************** *** 1,4 **** ! #!/usr/bonsaitools/bin/perl -w # -*- Mode: perl; indent-tabs-mode: nil -*- # # The contents of this file are subject to the Mozilla Public --- 1,4 ---- ! #!/usr/bin/perl -w # -*- Mode: perl; indent-tabs-mode: nil -*- # # The contents of this file are subject to the Mozilla Public *************** *** 11,17 **** # 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 --- 11,17 ---- # implied. See the License for the specific language governing # rights and limitations under the License. # ! # The Original Code is the Issuezilla Issue Tracking System. # # The Initial Developer of the Original Code is Netscape Communications # Corporation. Portions created by Netscape are *************** *** 23,35 **** use diagnostics; use strict; ! use Bug; require "CGI.pl"; $::lockcount = 0; unless ( Param("move-enabled") ) { ! print "\n

                  Sorry. Bug moving is not enabled here. "; ! print "If you need to move a bug, contact " . Param("maintainer"); exit; } --- 23,35 ---- use diagnostics; use strict; ! use Issue; require "CGI.pl"; $::lockcount = 0; unless ( Param("move-enabled") ) { ! print "\n

                  Sorry. Issue moving is not enabled here. "; ! print "If you need to move an issue, contact " . Param("maintainer"); exit; } *************** *** 48,55 **** if ($::lockcount <= 0) { $::lockcount = 0; if (!open(LOCKFID, ">>data/maillock")) { ! mkdir "data", 0777; ! chmod 0777, "data"; open(LOCKFID, ">>data/maillock") || die "Can't open lockfile."; } my $val = flock(LOCKFID,2); --- 48,55 ---- if ($::lockcount <= 0) { $::lockcount = 0; if (!open(LOCKFID, ">>data/maillock")) { ! mkdir "data", 0700; ! chmod 0700, "data"; open(LOCKFID, ">>data/maillock") || die "Can't open lockfile."; } my $val = flock(LOCKFID,2); *************** *** 57,63 **** print "Content-type: text/html\n\n"; print "Lock failed: $val\n"; } ! chmod 0666, "data/maillock"; } $::lockcount++; } --- 57,63 ---- print "Content-type: text/html\n\n"; print "Lock failed: $val\n"; } ! chmod 0600, "data/maillock"; } $::lockcount++; } *************** *** 70,80 **** } } ! if ( !defined $::FORM{'buglist'} ) { print "Content-type: text/html\n\n"; ! PutHeader("Move Bugs"); ! print "Move bugs either from the bug display page or perform a "; ! print "query and change several bugs at once.\n"; print "If you don't see the move button, then you either aren't "; print "logged in or aren't permitted to."; PutFooter(); --- 70,80 ---- } } ! if ( !defined $::FORM{'issuelist'} ) { print "Content-type: text/html\n\n"; ! PutHeader("Move Issues"); ! print "Move issues either from the issue display page or perform a "; ! print "query and change several issues at once.\n"; print "If you don't see the move button, then you either aren't "; print "logged in or aren't permitted to."; PutFooter(); *************** *** 82,140 **** } confirm_login(); ! my $exporter = $::COOKIE{"Bugzilla_login"}; my $movers = Param("movers"); $movers =~ s/\w?,\w?/|/g; $movers =~ s/@/\@/g; unless ($exporter =~ /($movers)/) { print "Content-type: text/html\n\n"; ! PutHeader("Move Bugs"); ! print "

                  You do not have permission to move bugs

                  \n"; PutFooter(); exit; } my $xml = ""; ! $xml .= Bug::XML_Header( Param("urlbase"), $::param{'version'}, Param("maintainer"), $exporter ); print "

                  \n"; ! foreach my $id (split(/:/, $::FORM{'buglist'})) { ! my $bug = new Bug($id, $::userid); ! $xml .= $bug->emitXML; ! if (!$bug->error) { my $exporterid = DBNameToIdAndCheck($exporter); ! my $fieldid = GetFieldID("bug_status"); ! my $cur_status= $bug->bug_status; ! SendSQL("INSERT INTO bugs_activity " . ! "(bug_id,who,bug_when,fieldid,oldvalue,newvalue) VALUES " . "($id,$exporterid,now(),$fieldid,'$cur_status','RESOLVED')"); my $fieldid = GetFieldID("resolution"); ! my $cur_res= $bug->resolution; ! SendSQL("INSERT INTO bugs_activity " . ! "(bug_id,who,bug_when,fieldid,oldvalue,newvalue) VALUES " . "($id,$exporterid,now(),$fieldid,'$cur_res','MOVED')"); ! SendSQL("UPDATE bugs SET bug_status =\"RESOLVED\" where bug_id=\"$id\""); ! SendSQL("UPDATE bugs SET resolution =\"MOVED\" where bug_id=\"$id\""); ! my $comment = "Bug moved to " . Param("move-to-url") . ".\n\n"; $comment .= "If the move succeeded, $exporter will recieve a mail\n"; ! $comment .= "containing the number of the new bug in the other database.\n"; ! $comment .= "If all went well, please mark this bug verified, and paste\n"; ! $comment .= "in a link to the new bug. Otherwise, reopen this bug.\n"; ! SendSQL("INSERT INTO longdescs (bug_id, who, bug_when, thetext) VALUES " . "($id, $exporterid, now(), " . SqlQuote($comment) . ")"); ! print "

                  Bug $id moved to " . Param("move-to-url") . ".
                  \n"; system("./processmail", $id, $exporter); } } print "

                  \n"; ! $xml .= Bug::XML_Footer; ! my $buglist = $::FORM{'buglist'}; ! $buglist =~ s/:/,/g; my $host = Param("urlbase"); $host =~ s#http://([^/]+)/.*#$1#; my $to = Param("move-to-address"); --- 82,140 ---- } confirm_login(); ! my $exporter = $::COOKIE{"Issuezilla_login"}; my $movers = Param("movers"); $movers =~ s/\w?,\w?/|/g; $movers =~ s/@/\@/g; unless ($exporter =~ /($movers)/) { print "Content-type: text/html\n\n"; ! PutHeader("Move Issues"); ! print "

                  You do not have permission to move issues

                  \n"; PutFooter(); exit; } my $xml = ""; ! $xml .= Issue::XML_Header( Param("urlbase"), $::param{'version'}, Param("maintainer"), $exporter ); print "

                  \n"; ! foreach my $id (split(/:/, $::FORM{'issuelist'})) { ! my $issue = new Issue($id, $::userid); ! $xml .= $issue->emitXML; ! if (!$issue->error) { my $exporterid = DBNameToIdAndCheck($exporter); ! my $fieldid = GetFieldID("issue_status"); ! my $cur_status= $issue->issue_status; ! SendSQL("INSERT INTO issues_activity " . ! "(issue_id,who,issue_when,fieldid,oldvalue,newvalue) VALUES " . "($id,$exporterid,now(),$fieldid,'$cur_status','RESOLVED')"); my $fieldid = GetFieldID("resolution"); ! my $cur_res= $issue->resolution; ! SendSQL("INSERT INTO issues_activity " . ! "(issue_id,who,issue_when,fieldid,oldvalue,newvalue) VALUES " . "($id,$exporterid,now(),$fieldid,'$cur_res','MOVED')"); ! SendSQL("UPDATE issues SET issue_status =\"RESOLVED\" where issue_id=\"$id\""); ! SendSQL("UPDATE issues SET resolution =\"MOVED\" where issue_id=\"$id\""); ! my $comment = "Issue moved to " . Param("move-to-url") . ".\n\n"; $comment .= "If the move succeeded, $exporter will recieve a mail\n"; ! $comment .= "containing the number of the new issue in the other database.\n"; ! $comment .= "If all went well, please mark this issue verified, and paste\n"; ! $comment .= "in a link to the new issue. Otherwise, reopen this issue.\n"; ! SendSQL("INSERT INTO longdescs (issue_id, who, issue_when, thetext) VALUES " . "($id, $exporterid, now(), " . SqlQuote($comment) . ")"); ! print "

                  Issue $id moved to " . Param("move-to-url") . ".
                  \n"; system("./processmail", $id, $exporter); } } print "

                  \n"; ! $xml .= Issue::XML_Footer; ! my $issuelist = $::FORM{'issuelist'}; ! $issuelist =~ s/:/,/g; my $host = Param("urlbase"); $host =~ s#http://([^/]+)/.*#$1#; my $to = Param("move-to-address"); *************** *** 142,156 **** my $msg = "To: $to\n"; my $from = Param("moved-from-address"); $from =~ s/@/\@/; ! $msg .= "From: Bugzilla <" . $from . ">\n"; ! $msg .= "Subject: Moving bug(s) $buglist\n\n"; $msg .= $xml . "\n"; open(SENDMAIL, ! "|/usr/lib/sendmail -ODeliveryMode=background -t") || ! die "Can't open sendmail"; print SENDMAIL $msg; close SENDMAIL; ! my $logstr = "XML: bugs $buglist sent to $to"; Log($logstr); --- 142,156 ---- my $msg = "To: $to\n"; my $from = Param("moved-from-address"); $from =~ s/@/\@/; ! $msg .= "From: Issuezilla <" . $from . ">\n"; ! $msg .= "Subject: Moving issue(s) $issuelist\n\n"; $msg .= $xml . "\n"; open(SENDMAIL, ! "|/var/qmail/bin/qmail-inject -froot") || ! die "Can't open /var/qmail/bin/qmail-inject"; print SENDMAIL $msg; close SENDMAIL; ! my $logstr = "XML: issues $issuelist sent to $to"; Log($logstr); Index: new_comment.cgi =================================================================== RCS file: /cvsroot/mozilla/webtools/bugzilla/new_comment.cgi,v retrieving revision 1.5 diff -c -r1.5 new_comment.cgi *** new_comment.cgi 2000/07/27 20:10:16 1.5 --- new_comment.cgi 2000/09/29 04:57:12 *************** *** 1,4 **** ! #!/usr/bonsaitools/bin/perl # -*- Mode: perl; indent-tabs-mode: nil -*- # # The contents of this file are subject to the Mozilla Public --- 1,4 ---- ! #!/usr/bin/perl # -*- Mode: perl; indent-tabs-mode: nil -*- # # The contents of this file are subject to the Mozilla Public *************** *** 11,17 **** # 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 --- 11,17 ---- # implied. See the License for the specific language governing # rights and limitations under the License. # ! # The Original Code is the Issuezilla Issue Tracking System. # # The Initial Developer of the Original Code is Netscape Communications # Corporation. Portions created by Netscape are Index: newquip.html =================================================================== RCS file: /cvsroot/mozilla/webtools/bugzilla/newquip.html,v retrieving revision 1.3 diff -c -r1.3 newquip.html *** newquip.html 1999/11/01 23:33:17 1.3 --- newquip.html 2000/09/29 04:57:12 *************** *** 11,17 **** 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 --- 11,17 ---- implied. See the License for the specific language governing rights and limitations under the License. ! The Original Code is the Issuezilla Issue Tracking System. The Initial Developer of the Original Code is Netscape Communications Corporation. Portions created by Netscape are *************** *** 25,31 **** I'm So Pretty and Witty And Wise

                  Add your own clever headline.

                  ! 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.
                  --- 25,31 ---- I'm So Pretty and Witty And Wise

                  Add your own clever headline.

                  ! The issuelist 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.
                  Index: post_bug.cgi =================================================================== RCS file: /cvsroot/mozilla/webtools/bugzilla/post_bug.cgi,v retrieving revision 1.28 diff -c -r1.28 post_bug.cgi *** post_bug.cgi 2000/08/30 21:32:43 1.28 --- post_bug.cgi 2000/09/29 04:57:12 *************** *** 1,4 **** ! #!/usr/bonsaitools/bin/perl -w # -*- Mode: perl; indent-tabs-mode: nil -*- # # The contents of this file are subject to the Mozilla Public --- 1,4 ---- ! #!/usr/bin/perl -w # -*- Mode: perl; indent-tabs-mode: nil -*- # # The contents of this file are subject to the Mozilla Public *************** *** 11,17 **** # 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 --- 11,17 ---- # implied. See the License for the specific language governing # rights and limitations under the License. # ! # The Original Code is the Issuezilla Issue Tracking System. # # The Initial Developer of the Original Code is Netscape Communications # Corporation. Portions created by Netscape are *************** *** 36,47 **** $zz = %::COOKIE; $zz = %::components; $zz = %::versions; ! $zz = @::legal_bug_status; $zz = @::legal_opsys; $zz = @::legal_platform; $zz = @::legal_priority; $zz = @::legal_product; ! $zz = @::legal_severity; $zz = %::target_milestone; } --- 36,47 ---- $zz = %::COOKIE; $zz = %::components; $zz = %::versions; ! $zz = @::legal_issue_status; $zz = @::legal_opsys; $zz = @::legal_platform; $zz = @::legal_priority; $zz = @::legal_product; ! $zz = @::legal_issue_type; $zz = %::target_milestone; } *************** *** 59,82 **** my $url = "enter_bug.cgi?$::buffer"; print "If you put a bookmark to this link, it will\n"; ! print "bring up the submit-a-new-bug page with the fields initialized\n"; print "as you've requested.\n"; PutFooter(); exit; } ! PutHeader("Posting Bug -- Please wait", "Posting Bug", "One moment please..."); ! umask 0; ConnectToDatabase(); my $product = $::FORM{'product'}; ! if(Param("usebuggroupsentry") && GroupExists($product)) { if(!UserInGroup($product)) { print "

                  Permission denied.

                  \n"; print "Sorry; you do not have the permissions necessary to enter\n"; ! print "a bug against this product.\n"; print "

                  \n"; PutFooter(); exit; --- 59,82 ---- my $url = "enter_bug.cgi?$::buffer"; print "If you put a bookmark to this link, it will\n"; ! print "bring up the submit-a-new-issue page with the fields initialized\n"; print "as you've requested.\n"; PutFooter(); exit; } ! PutHeader("Posting Issue -- Please wait", "Posting Issue", "One moment please..."); ! umask 077; ConnectToDatabase(); my $product = $::FORM{'product'}; ! if(Param("useissuegroupsentry") && GroupExists($product)) { if(!UserInGroup($product)) { print "

                  Permission denied.

                  \n"; print "Sorry; you do not have the permissions necessary to enter\n"; ! print "an issue against this product.\n"; print "

                  \n"; PutFooter(); exit; *************** *** 84,95 **** } if (!defined $::FORM{'component'} || $::FORM{'component'} eq "") { ! PuntTryAgain("You must choose a component that corresponds to this bug. " . "If necessary, just guess."); } if (!defined $::FORM{'short_desc'} || trim($::FORM{'short_desc'}) eq "") { ! PuntTryAgain("You must enter a summary for this bug."); } my $forceAssignedOK = 0; --- 84,95 ---- } if (!defined $::FORM{'component'} || $::FORM{'component'} eq "") { ! PuntTryAgain("You must choose a component that corresponds to this issue. " . "If necessary, just guess."); } if (!defined $::FORM{'short_desc'} || trim($::FORM{'short_desc'}) eq "") { ! PuntTryAgain("You must enter a summary for this issue."); } my $forceAssignedOK = 0; *************** *** 105,113 **** $::FORM{'reporter'} = DBNameToIdAndCheck($::FORM{'reporter'}); ! my @bug_fields = ("reporter", "product", "version", "rep_platform", ! "bug_severity", "priority", "op_sys", "assigned_to", ! "bug_status", "bug_file_loc", "short_desc", "component", "target_milestone"); if (Param("useqacontact")) { --- 105,113 ---- $::FORM{'reporter'} = DBNameToIdAndCheck($::FORM{'reporter'}); ! my @issue_fields = ("reporter", "product", "version", "rep_platform", ! "issue_type", "priority", "op_sys", "assigned_to", ! "issue_status", "issue_file_loc", "short_desc", "component", "target_milestone"); if (Param("useqacontact")) { *************** *** 117,138 **** my $qacontact = FetchOneColumn(); if (defined $qacontact && $qacontact ne "") { $::FORM{'qa_contact'} = DBNameToIdAndCheck($qacontact, 1); ! push(@bug_fields, "qa_contact"); } } ! if (exists $::FORM{'bug_status'}) { if (!UserInGroup("canedit") && !UserInGroup("canconfirm")) { ! delete $::FORM{'bug_status'}; } } ! if (!exists $::FORM{'bug_status'}) { ! $::FORM{'bug_status'} = $::unconfirmedstate; SendSQL("SELECT votestoconfirm FROM products WHERE product = " . SqlQuote($::FORM{'product'})); if (!FetchOneColumn()) { ! $::FORM{'bug_status'} = "NEW"; } } --- 117,138 ---- my $qacontact = FetchOneColumn(); if (defined $qacontact && $qacontact ne "") { $::FORM{'qa_contact'} = DBNameToIdAndCheck($qacontact, 1); ! push(@issue_fields, "qa_contact"); } } ! if (exists $::FORM{'issue_status'}) { if (!UserInGroup("canedit") && !UserInGroup("canconfirm")) { ! delete $::FORM{'issue_status'}; } } ! if (!exists $::FORM{'issue_status'}) { ! $::FORM{'issue_status'} = $::unconfirmedstate; SendSQL("SELECT votestoconfirm FROM products WHERE product = " . SqlQuote($::FORM{'product'})); if (!FetchOneColumn()) { ! $::FORM{'issue_status'} = "NEW"; } } *************** *** 150,186 **** CheckFormField(\%::FORM, 'target_milestone', \@{$::target_milestone{$::FORM{'product'}}}); CheckFormField(\%::FORM, 'rep_platform', \@::legal_platform); ! CheckFormField(\%::FORM, 'bug_severity', \@::legal_severity); CheckFormField(\%::FORM, 'priority', \@::legal_priority); CheckFormField(\%::FORM, 'op_sys', \@::legal_opsys); CheckFormFieldDefined(\%::FORM, 'assigned_to'); ! CheckFormField(\%::FORM, 'bug_status', \@::legal_bug_status); ! CheckFormFieldDefined(\%::FORM, 'bug_file_loc'); CheckFormField(\%::FORM, 'component', \@{$::components{$::FORM{'product'}}}); CheckFormFieldDefined(\%::FORM, 'comment'); } my @used_fields; ! foreach my $f (@bug_fields) { if (exists $::FORM{$f}) { push (@used_fields, $f); } } ! if (exists $::FORM{'bug_status'} && $::FORM{'bug_status'} ne $::unconfirmedstate) { push(@used_fields, "everconfirmed"); $::FORM{'everconfirmed'} = 1; } ! my $query = "INSERT INTO bugs (\n" . join(",\n", @used_fields) . ", creation_ts, groupset) VALUES ( "; foreach my $field (@used_fields) { ! # fix for 42609. if there is a http:// only in bug_file_loc, strip # it out and send an empty value. ! if ($field eq 'bug_file_loc') { if ($::FORM{$field} eq 'http://') { $::FORM{$field} = ""; $query .= SqlQuote($::FORM{$field}) . ",\n"; --- 150,186 ---- CheckFormField(\%::FORM, 'target_milestone', \@{$::target_milestone{$::FORM{'product'}}}); CheckFormField(\%::FORM, 'rep_platform', \@::legal_platform); ! CheckFormField(\%::FORM, 'issue_type', \@::legal_issue_type); CheckFormField(\%::FORM, 'priority', \@::legal_priority); CheckFormField(\%::FORM, 'op_sys', \@::legal_opsys); CheckFormFieldDefined(\%::FORM, 'assigned_to'); ! CheckFormField(\%::FORM, 'issue_status', \@::legal_issue_status); ! CheckFormFieldDefined(\%::FORM, 'issue_file_loc'); CheckFormField(\%::FORM, 'component', \@{$::components{$::FORM{'product'}}}); CheckFormFieldDefined(\%::FORM, 'comment'); } my @used_fields; ! foreach my $f (@issue_fields) { if (exists $::FORM{$f}) { push (@used_fields, $f); } } ! if (exists $::FORM{'issue_status'} && $::FORM{'issue_status'} ne $::unconfirmedstate) { push(@used_fields, "everconfirmed"); $::FORM{'everconfirmed'} = 1; } ! my $query = "INSERT INTO issues (\n" . join(",\n", @used_fields) . ", creation_ts, groupset) VALUES ( "; foreach my $field (@used_fields) { ! # fix for 42609. if there is a http:// only in issue_file_loc, strip # it out and send an empty value. ! if ($field eq 'issue_file_loc') { if ($::FORM{$field} eq 'http://') { $::FORM{$field} = ""; $query .= SqlQuote($::FORM{$field}) . ",\n"; *************** *** 235,252 **** SendSQL("select LAST_INSERT_ID()"); my $id = FetchOneColumn(); ! SendSQL("INSERT INTO longdescs (bug_id, who, bug_when, thetext) VALUES " . "($id, $::FORM{'reporter'}, now(), " . SqlQuote($comment) . ")"); foreach my $person (keys %ccids) { ! SendSQL("insert into cc (bug_id, who) values ($id, $person)"); } ! print "

                  Bug $id posted

                  \n"; ! system("./processmail", $id, $::COOKIE{'Bugzilla_login'}); ! print "
                  Back To BUG# $id
                  \n"; ! print "
                  Attach a file to this bug\n"; navigation_header(); --- 235,252 ---- SendSQL("select LAST_INSERT_ID()"); my $id = FetchOneColumn(); ! SendSQL("INSERT INTO longdescs (issue_id, who, issue_when, thetext) VALUES " . "($id, $::FORM{'reporter'}, now(), " . SqlQuote($comment) . ")"); foreach my $person (keys %ccids) { ! SendSQL("insert into cc (issue_id, who) values ($id, $person)"); } ! print "

                  Issue $id posted

                  \n"; ! system("./processmail", $id, $::COOKIE{'Issuezilla_login'}); ! print "
                  Back To ISSUE# $id
                  \n"; ! print "
                  Attach a file to this issue\n"; navigation_header(); Index: process_bug.cgi =================================================================== RCS file: /cvsroot/mozilla/webtools/bugzilla/process_bug.cgi,v retrieving revision 1.66 diff -c -r1.66 process_bug.cgi *** process_bug.cgi 2000/08/29 18:01:07 1.66 --- process_bug.cgi 2000/09/29 04:57:12 *************** *** 1,4 **** ! #!/usr/bonsaitools/bin/perl -w # -*- Mode: perl; indent-tabs-mode: nil -*- # # The contents of this file are subject to the Mozilla Public --- 1,4 ---- ! #!/usr/bin/perl -w # -*- Mode: perl; indent-tabs-mode: nil -*- # # The contents of this file are subject to the Mozilla Public *************** *** 11,17 **** # 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 --- 11,17 ---- # implied. See the License for the specific language governing # rights and limitations under the License. # ! # The Original Code is the Issuezilla Issue Tracking System. # # The Initial Developer of the Original Code is Netscape Communications # Corporation. Portions created by Netscape are *************** *** 42,48 **** %::legal_platform, %::legal_priority, %::target_milestone, ! %::legal_severity; my $whoid = confirm_login(); --- 42,48 ---- %::legal_platform, %::legal_priority, %::target_milestone, ! %::legal_issue_type; my $whoid = confirm_login(); *************** *** 50,56 **** print "Content-type: text/html\n\n"; ! PutHeader ("Bug processed"); GetVersionTable(); --- 50,56 ---- print "Content-type: text/html\n\n"; ! PutHeader ("Issue processed"); GetVersionTable(); *************** *** 90,96 **** if (!$vok || !$cok || !$mok) { print "

                  Changing product means changing version, target milestone and component.

                  \n"; print "You have chosen a new product, and now the version, target milestone and/or\n"; ! print "component fields are not correct. (Or, possibly, the bug did\n"; print "not have a valid target milestone, component or version field in the first place.)\n"; print "Anyway, please set the version, target milestone and component now.

                  \n"; print "

                  \n"; --- 90,96 ---- if (!$vok || !$cok || !$mok) { print "

                  Changing product means changing version, target milestone and component.

                  \n"; print "You have chosen a new product, and now the version, target milestone and/or\n"; ! print "component fields are not correct. (Or, possibly, the issue did\n"; print "not have a valid target milestone, component or version field in the first place.)\n"; print "Anyway, please set the version, target milestone and component now.

                  \n"; print "\n"; *************** *** 133,145 **** # now, the rules are pretty simple, and don't look at the field itself very # much, but that could be enhanced. ! my $lastbugid = 0; my $ownerid; my $reporterid; my $qacontactid; sub CheckCanChangeField { ! my ($f, $bugid, $oldvalue, $newvalue) = (@_); if ($f eq "assigned_to" || $f eq "reporter" || $f eq "qa_contact") { if ($oldvalue =~ /^\d+$/) { if ($oldvalue == 0) { --- 133,145 ---- # now, the rules are pretty simple, and don't look at the field itself very # much, but that could be enhanced. ! my $lastissueid = 0; my $ownerid; my $reporterid; my $qacontactid; sub CheckCanChangeField { ! my ($f, $issueid, $oldvalue, $newvalue) = (@_); if ($f eq "assigned_to" || $f eq "reporter" || $f eq "qa_contact") { if ($oldvalue =~ /^\d+$/) { if ($oldvalue == 0) { *************** *** 159,184 **** return 1; } if ($UserInEditGroupSet < 0) { ! $UserInEditGroupSet = UserInGroup("editbugs"); } if ($UserInEditGroupSet) { return 1; } ! if ($lastbugid != $bugid) { ! SendSQL("SELECT reporter, assigned_to, qa_contact FROM bugs " . ! "WHERE bug_id = $bugid"); ($reporterid, $ownerid, $qacontactid) = (FetchSQLData()); } ! # Let reporter change bug status, even if they can't edit bugs. ! # If reporter can't re-open their bug they will just file a duplicate. ! # While we're at it, let them close their own bugs as well. ! if ( ($f eq "bug_status") && ($whoid eq $reporterid) ) { return 1; } ! if ($f eq "bug_status" && $newvalue ne $::unconfirmedstate && IsOpenedState($newvalue)) { ! # Hmm. They are trying to set this bug to some opened state # that isn't the UNCONFIRMED state. Are they in the right # group? Or, has it ever been confirmed? If not, then this # isn't legal. --- 159,184 ---- return 1; } if ($UserInEditGroupSet < 0) { ! $UserInEditGroupSet = UserInGroup("editissues"); } if ($UserInEditGroupSet) { return 1; } ! if ($lastissueid != $issueid) { ! SendSQL("SELECT reporter, assigned_to, qa_contact FROM issues " . ! "WHERE issue_id = $issueid"); ($reporterid, $ownerid, $qacontactid) = (FetchSQLData()); } ! # Let reporter change issue status, even if they can't edit issues. ! # If reporter can't re-open their issue they will just file a duplicate. ! # While we're at it, let them close their own issues as well. ! if ( ($f eq "issue_status") && ($whoid eq $reporterid) ) { return 1; } ! if ($f eq "issue_status" && $newvalue ne $::unconfirmedstate && IsOpenedState($newvalue)) { ! # Hmm. They are trying to set this issue to some opened state # that isn't the UNCONFIRMED state. Are they in the right # group? Or, has it ever been confirmed? If not, then this # isn't legal. *************** *** 189,195 **** if ($UserInCanConfirmGroupSet) { return 1; } ! SendSQL("SELECT everconfirmed FROM bugs WHERE bug_id = $bugid"); my $everconfirmed = FetchOneColumn(); if ($everconfirmed) { return 1; --- 189,195 ---- if ($UserInCanConfirmGroupSet) { return 1; } ! SendSQL("SELECT everconfirmed FROM issues WHERE issue_id = $issueid"); my $everconfirmed = FetchOneColumn(); if ($everconfirmed) { return 1; *************** *** 202,208 **** $oldvalue = value_quote($oldvalue); $newvalue = value_quote($newvalue); print PuntTryAgain(qq{ ! Only the owner or submitter of the bug, or a sufficiently empowered user, may make that change to the $f field. --- 202,208 ---- $oldvalue = value_quote($oldvalue); $newvalue = value_quote($newvalue); print PuntTryAgain(qq{ ! Only the owner or submitter of the issue, or a sufficiently empowered user, may make that change to the $f field.
                  Old value:$oldvalue
                  *************** *** 231,240 **** if ( Param('strictvaluechecks') ) { CheckFormField(\%::FORM, 'rep_platform', \@::legal_platform); CheckFormField(\%::FORM, 'priority', \@::legal_priority); ! CheckFormField(\%::FORM, 'bug_severity', \@::legal_severity); CheckFormField(\%::FORM, 'component', \@{$::components{$::FORM{'product'}}}); ! CheckFormFieldDefined(\%::FORM, 'bug_file_loc'); CheckFormFieldDefined(\%::FORM, 'short_desc'); CheckFormField(\%::FORM, 'product', \@::legal_product); CheckFormField(\%::FORM, 'version', --- 231,240 ---- if ( Param('strictvaluechecks') ) { CheckFormField(\%::FORM, 'rep_platform', \@::legal_platform); CheckFormField(\%::FORM, 'priority', \@::legal_priority); ! CheckFormField(\%::FORM, 'issue_type', \@::legal_issue_type); CheckFormField(\%::FORM, 'component', \@{$::components{$::FORM{'product'}}}); ! CheckFormFieldDefined(\%::FORM, 'issue_file_loc'); CheckFormFieldDefined(\%::FORM, 'short_desc'); CheckFormField(\%::FORM, 'product', \@::legal_product); CheckFormField(\%::FORM, 'version', *************** *** 260,266 **** $action = trim($::FORM{action}); } if ($action eq Param("move-button-text")) { ! $::FORM{'buglist'} = join (":", @idlist); do "move.pl" || die "Error executing move.cgi: $!"; PutFooter(); exit; --- 260,266 ---- $action = trim($::FORM{action}); } if ($action eq Param("move-button-text")) { ! $::FORM{'issuelist'} = join (":", @idlist); do "move.pl" || die "Error executing move.cgi: $!"; PutFooter(); exit; *************** *** 268,286 **** if (!defined $::FORM{'who'}) { ! $::FORM{'who'} = $::COOKIE{'Bugzilla_login'}; } ! # the common updates to all bugs in @idlist start here # ! print "Update Bug " . join(" ", @idlist) . "\n"; if (defined $::FORM{'id'}) { navigation_header(); } print "
                  \n"; ! $::query = "update bugs\nset"; $::comma = ""; ! umask(0); sub DoComma { $::query .= "$::comma\n "; --- 268,286 ---- if (!defined $::FORM{'who'}) { ! $::FORM{'who'} = $::COOKIE{'Issuezilla_login'}; } ! # the common updates to all issues in @idlist start here # ! print "Update Issue " . join(" ", @idlist) . "\n"; if (defined $::FORM{'id'}) { navigation_header(); } print "
                  \n"; ! $::query = "update issues\nset"; $::comma = ""; ! umask(077); sub DoComma { $::query .= "$::comma\n "; *************** *** 289,295 **** sub DoConfirm { if ($UserInEditGroupSet < 0) { ! $UserInEditGroupSet = UserInGroup("editbugs"); } if ($UserInCanConfirmGroupSet < 0) { $UserInCanConfirmGroupSet = UserInGroup("canconfirm"); --- 289,295 ---- sub DoConfirm { if ($UserInEditGroupSet < 0) { ! $UserInEditGroupSet = UserInGroup("editissues"); } if ($UserInCanConfirmGroupSet < 0) { $UserInCanConfirmGroupSet = UserInGroup("canconfirm"); *************** *** 306,316 **** if ($str ne $::dontchange) { DoComma(); if (IsOpenedState($str)) { ! $::query .= "bug_status = IF(everconfirmed = 1, '$str', '$::unconfirmedstate')"; } else { ! $::query .= "bug_status = '$str'"; } ! $::FORM{'bug_status'} = $str; # Used later for call to # CheckCanChangeField to make sure this # is really kosher. } --- 306,316 ---- if ($str ne $::dontchange) { DoComma(); if (IsOpenedState($str)) { ! $::query .= "issue_status = IF(everconfirmed = 1, '$str', '$::unconfirmedstate')"; } else { ! $::query .= "issue_status = '$str'"; } ! $::FORM{'issue_status'} = $str; # Used later for call to # CheckCanChangeField to make sure this # is really kosher. } *************** *** 367,374 **** } } ! foreach my $field ("rep_platform", "priority", "bug_severity", ! "summary", "component", "bug_file_loc", "short_desc", "product", "version", "op_sys", "target_milestone", "status_whiteboard") { if (defined $::FORM{$field}) { --- 367,374 ---- } } ! foreach my $field ("rep_platform", "priority", "issue_type", ! "summary", "component", "issue_file_loc", "short_desc", "product", "version", "op_sys", "target_milestone", "status_whiteboard") { if (defined $::FORM{$field}) { *************** *** 400,412 **** my $origCcString; # We make sure to check out the CC list before we actually start touching any ! # bugs. mergeFromString() ultimately searches the database using a quoted # form of the data it gets from $::FORM{'cc'}, so anything bogus from a # security standpoint should trigger an abort there. # if (defined $::FORM{'newcc'} && defined $::FORM{'id'}) { ! $origCcSet->mergeFromDB("select who from cc where bug_id = $::FORM{'id'}"); ! $formCcSet->mergeFromDB("select who from cc where bug_id = $::FORM{'id'}"); $origCcString = $origCcSet->toString(); # cache a copy of the string vers if ((exists $::FORM{'removecc'}) && (exists $::FORM{'cc'})) { $formCcSet->removeItemsInArray(@{$::MFORM{'cc'}}); --- 400,412 ---- my $origCcString; # We make sure to check out the CC list before we actually start touching any ! # issues. mergeFromString() ultimately searches the database using a quoted # form of the data it gets from $::FORM{'cc'}, so anything bogus from a # security standpoint should trigger an abort there. # if (defined $::FORM{'newcc'} && defined $::FORM{'id'}) { ! $origCcSet->mergeFromDB("select who from cc where issue_id = $::FORM{'id'}"); ! $formCcSet->mergeFromDB("select who from cc where issue_id = $::FORM{'id'}"); $origCcString = $origCcSet->toString(); # cache a copy of the string vers if ((exists $::FORM{'removecc'}) && (exists $::FORM{'cc'})) { $formCcSet->removeItemsInArray(@{$::MFORM{'cc'}}); *************** *** 454,463 **** if ( Param("strictvaluechecks") ) { if ( !defined$::FORM{'assigned_to'} || trim($::FORM{'assigned_to'}) eq "") { ! PuntTryAgain("You cannot reassign to a bug to nobody. Unless " . "you intentionally cleared out the " . ! "\"Reassign bug to\" field, " . ! Param("browserbugmessage")); } } my $newid = DBNameToIdAndCheck($::FORM{'assigned_to'}); --- 454,463 ---- if ( Param("strictvaluechecks") ) { if ( !defined$::FORM{'assigned_to'} || trim($::FORM{'assigned_to'}) eq "") { ! PuntTryAgain("You cannot reassign to an issue to nobody. Unless " . "you intentionally cleared out the " . ! "\"Reassign issue to\" field, " . ! Param("browserissuemessage")); } } my $newid = DBNameToIdAndCheck($::FORM{'assigned_to'}); *************** *** 467,477 **** /^reassignbycomponent$/ && CheckonComment( "reassignbycomponent" ) && do { if ($::FORM{'product'} eq $::dontchange) { PuntTryAgain("You must specify a product to help determine the " . ! "new owner of these bugs."); } if ($::FORM{'component'} eq $::dontchange) { PuntTryAgain("You must specify a component whose owner should " . ! "get assigned these bugs."); } if ($::FORM{'compconfirm'}) { DoConfirm(); --- 467,477 ---- /^reassignbycomponent$/ && CheckonComment( "reassignbycomponent" ) && do { if ($::FORM{'product'} eq $::dontchange) { PuntTryAgain("You must specify a product to help determine the " . ! "new owner of these issues."); } if ($::FORM{'component'} eq $::dontchange) { PuntTryAgain("You must specify a component whose owner should " . ! "get assigned these issues."); } if ($::FORM{'compconfirm'}) { DoConfirm(); *************** *** 517,549 **** CheckFormFieldDefined(\%::FORM,'dup_id'); } my $num = trim($::FORM{'dup_id'}); ! SendSQL("SELECT bug_id FROM bugs WHERE bug_id = " . SqlQuote($num)); $num = FetchOneColumn(); if (!$num) { ! PuntTryAgain("You must specify a bug number of which this bug " . ! "is a duplicate or a valid bug number. The bug has not been changed.") } if (!defined($::FORM{'id'}) || $num == $::FORM{'id'}) { PuntTryAgain("Nice try, $::FORM{'who'}. But it doesn't really ". ! "make sense to mark a bug as a duplicate of " . "itself, does it?"); } my $checkid = trim($::FORM{'id'}); ! SendSQL("SELECT bug_id FROM bugs where bug_id = " . SqlQuote($checkid)); $checkid = FetchOneColumn(); if (!$checkid) { ! PuntTryAgain("The bug id $::FORM{'id'} is invalid. Please reload this bug ". "and try again."); } ! AppendComment($num, $::FORM{'who'}, "*** Bug $::FORM{'id'} has been marked as a duplicate of this bug. ***"); if ( Param('strictvaluechecks') ) { CheckFormFieldDefined(\%::FORM,'comment'); } ! $::FORM{'comment'} .= "\n\n*** This bug has been marked as a duplicate of $num ***"; ! print "
                  Old value:$oldvalue

                  Notation added to bug $num

                  \n"; system("./processmail", $num, $::FORM{'who'}); ! print "
                  Go To BUG# $num
                  \n"; last SWITCH; }; --- 517,549 ---- CheckFormFieldDefined(\%::FORM,'dup_id'); } my $num = trim($::FORM{'dup_id'}); ! SendSQL("SELECT issue_id FROM issues WHERE issue_id = " . SqlQuote($num)); $num = FetchOneColumn(); if (!$num) { ! PuntTryAgain("You must specify an issue number of which this issue " . ! "is a duplicate or a valid issue number. The issue has not been changed.") } if (!defined($::FORM{'id'}) || $num == $::FORM{'id'}) { PuntTryAgain("Nice try, $::FORM{'who'}. But it doesn't really ". ! "make sense to mark an issue as a duplicate of " . "itself, does it?"); } my $checkid = trim($::FORM{'id'}); ! SendSQL("SELECT issue_id FROM issues where issue_id = " . SqlQuote($checkid)); $checkid = FetchOneColumn(); if (!$checkid) { ! PuntTryAgain("The issue id $::FORM{'id'} is invalid. Please reload this issue ". "and try again."); } ! AppendComment($num, $::FORM{'who'}, "*** Issue $::FORM{'id'} has been marked as a duplicate of this issue. ***"); if ( Param('strictvaluechecks') ) { CheckFormFieldDefined(\%::FORM,'comment'); } ! $::FORM{'comment'} .= "\n\n*** This issue has been marked as a duplicate of $num ***"; ! print "

                  Notation added to issue $num

                  \n"; system("./processmail", $num, $::FORM{'who'}); ! print "
                  Go To ISSUE# $num
                  \n"; last SWITCH; }; *************** *** 555,561 **** if ($#idlist < 0) { ! PuntTryAgain("You apparently didn't choose any bugs to modify."); } --- 555,561 ---- if ($#idlist < 0) { ! PuntTryAgain("You apparently didn't choose any issues to modify."); } *************** *** 586,592 **** if ($::comma eq "" && 0 == @keywordlist && $keywordaction ne "makeexact") { if (!defined $::FORM{'comment'} || $::FORM{'comment'} =~ /^\s*$/) { PuntTryAgain("Um, you apparently did not change anything on the " . ! "selected bugs."); } } --- 586,592 ---- if ($::comma eq "" && 0 == @keywordlist && $keywordaction ne "makeexact") { if (!defined $::FORM{'comment'} || $::FORM{'comment'} =~ /^\s*$/) { PuntTryAgain("Um, you apparently did not change anything on the " . ! "selected issues."); } } *************** *** 594,603 **** my $delta_ts; ! sub SnapShotBug { my ($id) = (@_); SendSQL("select delta_ts, " . join(',', @::log_columns) . ! " from bugs where bug_id = $id"); my @row = FetchSQLData(); $delta_ts = shift @row; --- 594,603 ---- my $delta_ts; ! sub SnapShotIssue { my ($id) = (@_); SendSQL("select delta_ts, " . join(',', @::log_columns) . ! " from issues where issue_id = $id"); my @row = FetchSQLData(); $delta_ts = shift @row; *************** *** 623,630 **** my $newstr = SnapShotDeps($i, $target, $me); if ($oldstr ne $newstr) { my $fieldid = GetFieldID($target); ! SendSQL("INSERT INTO bugs_activity " . ! "(bug_id,who,bug_when,fieldid,oldvalue,newvalue) VALUES " . "($i,$whoid,$timestamp,$fieldid,'$oldstr','$newstr')"); return 1; } --- 623,630 ---- my $newstr = SnapShotDeps($i, $target, $me); if ($oldstr ne $newstr) { my $fieldid = GetFieldID($target); ! SendSQL("INSERT INTO issues_activity " . ! "(issue_id,who,issue_when,fieldid,oldvalue,newvalue) VALUES " . "($i,$whoid,$timestamp,$fieldid,'$oldstr','$newstr')"); return 1; } *************** *** 637,655 **** # is actually usually not used. ! # this loop iterates once for each bug to be processed (eg when this script ! # is called with multiple bugs selected from buglist.cgi instead of # show_bug.cgi). # foreach my $id (@idlist) { my %dependencychanged; my $write = "WRITE"; # Might want to make a param to control # whether we do LOW_PRIORITY ... ! SendSQL("LOCK TABLES bugs $write, bugs_activity $write, cc $write, " . "profiles $write, dependencies $write, votes $write, " . "keywords $write, longdescs $write, fielddefs $write, " . "keyworddefs READ, groups READ, attachments READ, products READ"); ! my @oldvalues = SnapShotBug($id); my %oldhash; my $i = 0; foreach my $col (@::log_columns) { --- 637,655 ---- # is actually usually not used. ! # this loop iterates once for each issue to be processed (eg when this script ! # is called with multiple issues selected from buglist.cgi instead of # show_bug.cgi). # foreach my $id (@idlist) { my %dependencychanged; my $write = "WRITE"; # Might want to make a param to control # whether we do LOW_PRIORITY ... ! SendSQL("LOCK TABLES issues $write, issues_activity $write, cc $write, " . "profiles $write, dependencies $write, votes $write, " . "keywords $write, longdescs $write, fielddefs $write, " . "keyworddefs READ, groups READ, attachments READ, products READ"); ! my @oldvalues = SnapShotIssue($id); my %oldhash; my $i = 0; foreach my $col (@::log_columns) { *************** *** 668,687 **** SqlQuote($oldhash{'product'})); if ($value eq FetchOneColumn()) { SendSQL("UNLOCK TABLES"); ! PuntTryAgain("You must determine a target milestone for bug $id " . "if you are going to accept it. (Part of " . ! "accepting a bug is giving an estimate of when it " . "will be fixed.)"); } } if (defined $::FORM{'delta_ts'} && $::FORM{'delta_ts'} ne $delta_ts) { print "

                  Mid-air collision detected!

                  ! Someone else has made changes to this bug at the same time you were trying to. The changes made were:

                  "; ! DumpBugActivity($id, $delta_ts); my $longdesc = GetLongDescriptionAsHTML($id); my $longchanged = 0; --- 668,687 ---- SqlQuote($oldhash{'product'})); if ($value eq FetchOneColumn()) { SendSQL("UNLOCK TABLES"); ! PuntTryAgain("You must determine a target milestone for issue $id " . "if you are going to accept it. (Part of " . ! "accepting an issue is giving an estimate of when it " . "will be fixed.)"); } } if (defined $::FORM{'delta_ts'} && $::FORM{'delta_ts'} ne $delta_ts) { print "

                  Mid-air collision detected!

                  ! Someone else has made changes to this issue at the same time you were trying to. The changes made were:

                  "; ! DumpIssueActivity($id, $delta_ts); my $longdesc = GetLongDescriptionAsHTML($id); my $longchanged = 0; *************** *** 704,710 **** if ($longchanged) { print ", except for the changes to the description"; } ! print qq{.

                  \n
                • Throw away my changes, and go revisit bug $id
                \n}; PutFooter(); exit; } --- 704,710 ---- if ($longchanged) { print ", except for the changes to the description"; } ! print qq{.\n
              4. Throw away my changes, and go revisit issue $id
\n}; PutFooter(); exit; } *************** *** 721,731 **** next; } ! SendSQL("select bug_id from bugs where bug_id = " . SqlQuote($i)); my $comp = FetchOneColumn(); if ($comp ne $i) { ! PuntTryAgain("$i is not a legal bug number"); } if (!exists $seen{$i}) { push(@{$deps{$target}}, $i); --- 721,731 ---- next; } ! SendSQL("select issue_id from issues where issue_id = " . SqlQuote($i)); my $comp = FetchOneColumn(); if ($comp ne $i) { ! PuntTryAgain("$i is not a legal issue number"); } if (!exists $seen{$i}) { push(@{$deps{$target}}, $i); *************** *** 766,809 **** # For delete, we just delete things on the list. my $changed = 0; if ($keywordaction eq "makeexact") { ! SendSQL("DELETE FROM keywords WHERE bug_id = $id"); $changed = 1; } foreach my $keyword (@keywordlist) { if ($keywordaction ne "makeexact") { SendSQL("DELETE FROM keywords ! WHERE bug_id = $id AND keywordid = $keyword"); $changed = 1; } if ($keywordaction ne "delete") { SendSQL("INSERT INTO keywords ! (bug_id, keywordid) VALUES ($id, $keyword)"); $changed = 1; } } if ($changed) { SendSQL("SELECT keyworddefs.name FROM keyworddefs, keywords ! WHERE keywords.bug_id = $id AND keyworddefs.id = keywords.keywordid ORDER BY keyworddefs.name"); my @list; while (MoreSQLData()) { push(@list, FetchOneColumn()); } ! SendSQL("UPDATE bugs SET keywords = " . SqlQuote(join(', ', @list)) . ! " WHERE bug_id = $id"); } } ! my $query = "$basequery\nwhere bug_id = $id"; # print "
$query
\n"; if ($::comma ne "") { SendSQL($query); ! SendSQL("select delta_ts from bugs where bug_id = $id"); } else { SendSQL("select now()"); } --- 766,809 ---- # For delete, we just delete things on the list. my $changed = 0; if ($keywordaction eq "makeexact") { ! SendSQL("DELETE FROM keywords WHERE issue_id = $id"); $changed = 1; } foreach my $keyword (@keywordlist) { if ($keywordaction ne "makeexact") { SendSQL("DELETE FROM keywords ! WHERE issue_id = $id AND keywordid = $keyword"); $changed = 1; } if ($keywordaction ne "delete") { SendSQL("INSERT INTO keywords ! (issue_id, keywordid) VALUES ($id, $keyword)"); $changed = 1; } } if ($changed) { SendSQL("SELECT keyworddefs.name FROM keyworddefs, keywords ! WHERE keywords.issue_id = $id AND keyworddefs.id = keywords.keywordid ORDER BY keyworddefs.name"); my @list; while (MoreSQLData()) { push(@list, FetchOneColumn()); } ! SendSQL("UPDATE issues SET keywords = " . SqlQuote(join(', ', @list)) . ! " WHERE issue_id = $id"); } } ! my $query = "$basequery\nwhere issue_id = $id"; # print "
$query
\n"; if ($::comma ne "") { SendSQL($query); ! SendSQL("select delta_ts from issues where issue_id = $id"); } else { SendSQL("select now()"); } *************** *** 819,825 **** # update the database to look like the form # my @CCDELTAS = $origCcSet->generateSqlDeltas($formCcSet, "cc", ! "bug_id", $::FORM{'id'}, "who"); $CCDELTAS[0] eq "" || SendSQL($CCDELTAS[0]); $CCDELTAS[1] eq "" || SendSQL($CCDELTAS[1]); --- 819,825 ---- # update the database to look like the form # my @CCDELTAS = $origCcSet->generateSqlDeltas($formCcSet, "cc", ! "issue_id", $::FORM{'id'}, "who"); $CCDELTAS[0] eq "" || SendSQL($CCDELTAS[0]); $CCDELTAS[1] eq "" || SendSQL($CCDELTAS[1]); *************** *** 827,834 **** my $col = GetFieldID('cc'); my $origq = SqlQuote($origCcString); my $newq = SqlQuote($formCcSet->toString()); ! SendSQL("INSERT INTO bugs_activity " . ! "(bug_id,who,bug_when,fieldid,oldvalue,newvalue) VALUES " . "($id,$whoid,'$timestamp',$col,$origq,$newq)"); } --- 827,834 ---- my $col = GetFieldID('cc'); my $origq = SqlQuote($origCcString); my $newq = SqlQuote($formCcSet->toString()); ! SendSQL("INSERT INTO issues_activity " . ! "(issue_id,who,issue_when,fieldid,oldvalue,newvalue) VALUES " . "($id,$whoid,'$timestamp',$col,$origq,$newq)"); } *************** *** 887,896 **** # get a snapshot of the newly set values out of the database, ! # and then generate any necessary bug activity entries by seeing # what has changed since before we wrote out the new values. # ! my @newvalues = SnapShotBug($id); foreach my $c (@::log_columns) { my $col = $c; # We modify it, don't want to modify array --- 887,896 ---- # get a snapshot of the newly set values out of the database, ! # and then generate any necessary issue activity entries by seeing # what has changed since before we wrote out the new values. # ! my @newvalues = SnapShotIssue($id); foreach my $c (@::log_columns) { my $col = $c; # We modify it, don't want to modify array *************** *** 909,945 **** $new = ($new) ? DBID_to_name($new) : ""; $origCcString .= ",$old"; # make sure to send mail to people # if they are going to no longer get ! # updates about this bug. } if ($col eq 'product') { RemoveVotes($id, 0, ! "This bug has been moved to a different product"); } $col = GetFieldID($col); $old = SqlQuote($old); $new = SqlQuote($new); ! my $q = "insert into bugs_activity (bug_id,who,bug_when,fieldid,oldvalue,newvalue) values ($id,$whoid,'$timestamp',$col,$old,$new)"; # puts "
$q
" SendSQL($q); } } ! print "

Changes to bug $id submitted

\n"; SendSQL("unlock tables"); system("./processmail", "-forcecc", $origCcString, $id, $::FORM{'who'}); ! print "
Back To BUG# $id
\n"; foreach my $k (keys(%dependencychanged)) { ! print "

Checking for dependency changes on bug $k

\n"; system("./processmail", $k, $::FORM{'who'}); ! print "
Go To BUG# $k
\n"; } } ! if (defined $::next_bug) { ! print("

The next bug in your list is:\n"); ! $::FORM{'id'} = $::next_bug; print "


\n"; navigation_header(); --- 909,945 ---- $new = ($new) ? DBID_to_name($new) : ""; $origCcString .= ",$old"; # make sure to send mail to people # if they are going to no longer get ! # updates about this issue. } if ($col eq 'product') { RemoveVotes($id, 0, ! "This issue has been moved to a different product"); } $col = GetFieldID($col); $old = SqlQuote($old); $new = SqlQuote($new); ! my $q = "insert into issues_activity (issue_id,who,issue_when,fieldid,oldvalue,newvalue) values ($id,$whoid,'$timestamp',$col,$old,$new)"; # puts "
$q
" SendSQL($q); } } ! print "

Changes to issue $id submitted

\n"; SendSQL("unlock tables"); system("./processmail", "-forcecc", $origCcString, $id, $::FORM{'who'}); ! print "
Back To ISSUE# $id
\n"; foreach my $k (keys(%dependencychanged)) { ! print "

Checking for dependency changes on issue $k

\n"; system("./processmail", $k, $::FORM{'who'}); ! print "
Go To ISSUE# $k
\n"; } } ! if (defined $::next_issue) { ! print("

The next issue in your list is:\n"); ! $::FORM{'id'} = $::next_issue; print "


\n"; navigation_header(); Index: processmail =================================================================== RCS file: /cvsroot/mozilla/webtools/bugzilla/processmail,v retrieving revision 1.50 diff -c -r1.50 processmail *** processmail 2000/09/15 22:39:35 1.50 --- processmail 2000/09/29 04:57:12 *************** *** 1,4 **** ! #!/usr/bonsaitools/bin/perl -w # -*- Mode: perl; indent-tabs-mode: nil -*- # # The contents of this file are subject to the Mozilla Public --- 1,4 ---- ! #!/usr/bin/perl -w # -*- Mode: perl; indent-tabs-mode: nil -*- # # The contents of this file are subject to the Mozilla Public *************** *** 11,17 **** # 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 --- 11,17 ---- # implied. See the License for the specific language governing # rights and limitations under the License. # ! # The Original Code is the Issuezilla Issue Tracking System. # # The Initial Developer of the Original Code is Netscape Communications # Corporation. Portions created by Netscape are *************** *** 33,39 **** $| = 1; ! umask(0); $::lockcount = 0; my $regenerate = 0; --- 33,39 ---- $| = 1; ! umask(077); $::lockcount = 0; my $regenerate = 0; *************** *** 45,59 **** if ($::lockcount <= 0) { $::lockcount = 0; if (!open(LOCKFID, ">>data/maillock")) { ! mkdir "data", 0777; ! chmod 0777, "data"; open(LOCKFID, ">>data/maillock") || die "Can't open lockfile."; } my $val = flock(LOCKFID,2); if (!$val) { # '2' is magic 'exclusive lock' const. print "Lock failed: $val\n"; } ! chmod 0666, "data/maillock"; } $::lockcount++; } --- 45,59 ---- if ($::lockcount <= 0) { $::lockcount = 0; if (!open(LOCKFID, ">>data/maillock")) { ! mkdir "data", 0700; ! chmod 0700, "data"; open(LOCKFID, ">>data/maillock") || die "Can't open lockfile."; } my $val = flock(LOCKFID,2); if (!$val) { # '2' is magic 'exclusive lock' const. print "Lock failed: $val\n"; } ! chmod 0600, "data/maillock"; } $::lockcount++; } *************** *** 119,125 **** my $result = ""; my $me = "blocked"; my $target = "dependson"; ! my $title = "BugsThisDependsOn"; for (1..2) { SendSQL("select $target from dependencies where $me = $id order by $target"); my @list; --- 119,125 ---- my $result = ""; my $me = "blocked"; my $target = "dependson"; ! my $title = "IssuesThisDependsOn"; for (1..2) { SendSQL("select $target from dependencies where $me = $id order by $target"); my @list; *************** *** 130,140 **** my @verbose; my $count = 0; foreach my $i (@list) { ! SendSQL("select bug_status, resolution from bugs where bug_id = $i"); ! my ($bug_status, $resolution) = (FetchSQLData()); my $desc; ! if ($bug_status eq "NEW" || $bug_status eq "ASSIGNED" || ! $bug_status eq "REOPENED") { $desc = ""; } else { $desc = "[$resolution]"; --- 130,140 ---- my @verbose; my $count = 0; foreach my $i (@list) { ! SendSQL("select issue_status, resolution from issues where issue_id = $i"); ! my ($issue_status, $resolution) = (FetchSQLData()); my $desc; ! if ($issue_status eq "NEW" || $issue_status eq "ASSIGNED" || ! $issue_status eq "REOPENED") { $desc = ""; } else { $desc = "[$resolution]"; *************** *** 151,175 **** my $tmp = $me; $me = $target; $target = $tmp; ! $title = "OtherBugsDependingOnThis"; } return $result; } ! sub GetBugText { my ($id) = (@_); ! undef %::bug; ! my @collist = ("bug_id", "product", "version", "rep_platform", "op_sys", ! "bug_status", "resolution", "priority", "bug_severity", ! "assigned_to", "reporter", "bug_file_loc", "short_desc", "component", "qa_contact", "target_milestone", "status_whiteboard", "groupset"); my $query = "select " . join(", ", @collist) . ! " from bugs where bug_id = $id"; SendSQL($query); --- 151,175 ---- my $tmp = $me; $me = $target; $target = $tmp; ! $title = "OtherIssuesDependingOnThis"; } return $result; } ! sub GetIssueText { my ($id) = (@_); ! undef %::issue; ! my @collist = ("issue_id", "product", "version", "rep_platform", "op_sys", ! "issue_status", "resolution", "priority", "issue_type", ! "assigned_to", "reporter", "issue_file_loc", "short_desc", "component", "qa_contact", "target_milestone", "status_whiteboard", "groupset"); my $query = "select " . join(", ", @collist) . ! " from issues where issue_id = $id"; SendSQL($query); *************** *** 178,230 **** return ""; } foreach my $field (@collist) { ! $::bug{$field} = shift @row; ! if (!defined $::bug{$field}) { ! $::bug{$field} = ""; } } ! $::bug{'assigned_to'} = DBID_to_name($::bug{'assigned_to'}); ! $::bug{'reporter'} = DBID_to_name($::bug{'reporter'}); my $qa_contact = ""; my $target_milestone = ""; my $status_whiteboard = ""; ! if (Param('useqacontact') && $::bug{'qa_contact'} > 0) { ! $::bug{'qa_contact'} = DBID_to_name($::bug{'qa_contact'}); ! $qa_contact = "QAContact: $::bug{'qa_contact'}\n"; } else { ! $::bug{'qa_contact'} = ""; } ! if (Param('usetargetmilestone') && $::bug{'target_milestone'} ne "") { ! $target_milestone = "TargetMilestone: $::bug{'target_milestone'}\n"; } ! if (Param('usestatuswhiteboard') && $::bug{'status_whiteboard'} ne "") { ! $status_whiteboard = "StatusWhiteboard: $::bug{'status_whiteboard'}\n"; } ! $::bug{'long_desc'} = GetLongDescriptionAsText($id); my $cclist = new RelationSet(); ! $cclist->mergeFromDB("select who from cc where bug_id = $id"); my @voterlist; ! SendSQL("select profiles.login_name from votes, profiles where votes.bug_id = $id and profiles.userid = votes.who"); while (MoreSQLData()) { my $v = FetchOneColumn(); push(@voterlist, $v); } ! $::bug{'cclist'} = $cclist->toString(); ! $::bug{'voterlist'} = join(',', @voterlist); if (Param("prettyasciimail")) { $^A = ""; ! my $temp = formline <<'END',$::bug{'short_desc'},$id,$::bug{'product'},$::bug{'bug_status'},$::bug{'version'},$::bug{'resolution'},$::bug{'rep_platform'},$::bug{'bug_severity'},$::bug{'op_sys'},$::bug{'priority'},$::bug{'component'},$::bug{'assigned_to'},$::bug{'reporter'},$qa_contact,DescCC($cclist),$target_milestone,${status_whiteboard},$::bug{'bug_file_loc'},DescDependencies($id); +============================================================================+ | @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< | +----------------------------------------------------------------------------+ ! | Bug #: @<<<<<<<<<<< Product: @<<<<<<<<<<<<<<<<<<<<<< | | Status: @<<<<<<<<<<<<<<<<<< Version: @<<<<<<<<<<<<<<<<<<<<<< | | Resolution: @<<<<<<<<<<<<<<<<<< Platform: @<<<<<<<<<<<<<<<<<<<<<< | ! | Severity: @<<<<<<<<<<<<<<<<<< OS/Version: @<<<<<<<<<<<<<<<<<<<<<< | | Priority: @<<<<<<<<<<<<<<<<<< Component: @<<<<<<<<<<<<<<<<<<<<<< | +----------------------------------------------------------------------------+ | Assigned To: @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< | --- 178,230 ---- return ""; } foreach my $field (@collist) { ! $::issue{$field} = shift @row; ! if (!defined $::issue{$field}) { ! $::issue{$field} = ""; } } ! $::issue{'assigned_to'} = DBID_to_name($::issue{'assigned_to'}); ! $::issue{'reporter'} = DBID_to_name($::issue{'reporter'}); my $qa_contact = ""; my $target_milestone = ""; my $status_whiteboard = ""; ! if (Param('useqacontact') && $::issue{'qa_contact'} > 0) { ! $::issue{'qa_contact'} = DBID_to_name($::issue{'qa_contact'}); ! $qa_contact = "QAContact: $::issue{'qa_contact'}\n"; } else { ! $::issue{'qa_contact'} = ""; } ! if (Param('usetargetmilestone') && $::issue{'target_milestone'} ne "") { ! $target_milestone = "TargetMilestone: $::issue{'target_milestone'}\n"; } ! if (Param('usestatuswhiteboard') && $::issue{'status_whiteboard'} ne "") { ! $status_whiteboard = "StatusWhiteboard: $::issue{'status_whiteboard'}\n"; } ! $::issue{'long_desc'} = GetLongDescriptionAsText($id); my $cclist = new RelationSet(); ! $cclist->mergeFromDB("select who from cc where issue_id = $id"); my @voterlist; ! SendSQL("select profiles.login_name from votes, profiles where votes.issue_id = $id and profiles.userid = votes.who"); while (MoreSQLData()) { my $v = FetchOneColumn(); push(@voterlist, $v); } ! $::issue{'cclist'} = $cclist->toString(); ! $::issue{'voterlist'} = join(',', @voterlist); if (Param("prettyasciimail")) { $^A = ""; ! my $temp = formline <<'END',$::issue{'short_desc'},$id,$::issue{'product'},$::issue{'issue_status'},$::issue{'version'},$::issue{'resolution'},$::issue{'rep_platform'},$::issue{'issue_type'},$::issue{'op_sys'},$::issue{'priority'},$::issue{'component'},$::issue{'assigned_to'},$::issue{'reporter'},$qa_contact,DescCC($cclist),$target_milestone,${status_whiteboard},$::issue{'issue_file_loc'},DescDependencies($id); +============================================================================+ | @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< | +----------------------------------------------------------------------------+ ! | Issue #: @<<<<<<<<<<< Product: @<<<<<<<<<<<<<<<<<<<<<< | | Status: @<<<<<<<<<<<<<<<<<< Version: @<<<<<<<<<<<<<<<<<<<<<< | | Resolution: @<<<<<<<<<<<<<<<<<< Platform: @<<<<<<<<<<<<<<<<<<<<<< | ! | Issue type: @<<<<<<<<<<<<<<<<<< OS/Version: @<<<<<<<<<<<<<<<<<<<<<< | | Priority: @<<<<<<<<<<<<<<<<<< Component: @<<<<<<<<<<<<<<<<<<<<<< | +----------------------------------------------------------------------------+ | Assigned To: @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< | *************** *** 240,266 **** | DESCRIPTION | END ! my $prettymail = $^A . $::bug{'long_desc'}; return $prettymail; } else { ! 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'} ! AssignedTo: $::bug{'assigned_to'} ! ReportedBy: $::bug{'reporter'} ! $qa_contact$target_milestone${status_whiteboard}URL: $::bug{'bug_file_loc'} ! " . DescCC($cclist) . "Summary: $::bug{'short_desc'} " . DescDependencies($id) . " ! $::bug{'long_desc'} "; } --- 240,266 ---- | DESCRIPTION | END ! my $prettymail = $^A . $::issue{'long_desc'}; return $prettymail; } else { ! return "Issue\#: $id ! Product: $::issue{'product'} ! Version: $::issue{'version'} ! Platform: $::issue{'rep_platform'} ! OS/Version: $::issue{'op_sys'} ! Status: $::issue{'issue_status'} ! Resolution: $::issue{'resolution'} ! Issue type: $::issue{'issue_type'} ! Priority: $::issue{'priority'} ! Component: $::issue{'component'} ! AssignedTo: $::issue{'assigned_to'} ! ReportedBy: $::issue{'reporter'} ! $qa_contact$target_milestone${status_whiteboard}URL: $::issue{'issue_file_loc'} ! " . DescCC($cclist) . "Summary: $::issue{'short_desc'} " . DescDependencies($id) . " ! $::issue{'long_desc'} "; } *************** *** 277,286 **** if (!defined $i || $i eq "") { next; } ! SendSQL("select emailnotification, groupset & $::bug{'groupset'} from profiles where login_name = " . SqlQuote($i)); my ($emailnotification, $groupset) = (FetchSQLData()); ! if ($groupset ne $::bug{'groupset'}) { next; } if ($emailnotification eq "CConly") { --- 277,286 ---- if (!defined $i || $i eq "") { next; } ! SendSQL("select emailnotification, groupset & $::issue{'groupset'} from profiles where login_name = " . SqlQuote($i)); my ($emailnotification, $groupset) = (FetchSQLData()); ! if ($groupset ne $::issue{'groupset'}) { next; } if ($emailnotification eq "CConly") { *************** *** 335,341 **** } ! sub NewProcessOneBug { my ($id) = (@_); my @headerlist; --- 335,341 ---- } ! sub NewProcessOneIssue { my ($id) = (@_); my @headerlist; *************** *** 354,372 **** $fielddescription{$field} = $description; } SendSQL("SELECT " . join(',', @::log_columns) . ", lastdiffed, now() " . ! "FROM bugs WHERE bug_id = $id"); my @row = FetchSQLData(); foreach my $i (@::log_columns) { $values{$i} = shift(@row); } my ($start, $end) = (@row); my $ccSet = new RelationSet(); ! $ccSet->mergeFromDB("SELECT who FROM cc WHERE bug_id = $id"); $values{'cc'} = $ccSet->toString(); my @voterlist; SendSQL("SELECT profiles.login_name FROM votes, profiles " . ! "WHERE votes.bug_id = $id AND profiles.userid = votes.who"); while (MoreSQLData()) { push(@voterlist, FetchOneColumn()); } --- 354,372 ---- $fielddescription{$field} = $description; } SendSQL("SELECT " . join(',', @::log_columns) . ", lastdiffed, now() " . ! "FROM issues WHERE issue_id = $id"); my @row = FetchSQLData(); foreach my $i (@::log_columns) { $values{$i} = shift(@row); } my ($start, $end) = (@row); my $ccSet = new RelationSet(); ! $ccSet->mergeFromDB("SELECT who FROM cc WHERE issue_id = $id"); $values{'cc'} = $ccSet->toString(); my @voterlist; SendSQL("SELECT profiles.login_name FROM votes, profiles " . ! "WHERE votes.issue_id = $id AND profiles.userid = votes.who"); while (MoreSQLData()) { push(@voterlist, FetchOneColumn()); } *************** *** 381,394 **** SendSQL("SELECT profiles.login_name, fielddefs.description, " . ! " bug_when, oldvalue, newvalue " . ! "FROM bugs_activity, fielddefs, profiles " . ! "WHERE bug_id = $id " . ! " AND fielddefs.fieldid = bugs_activity.fieldid " . " AND profiles.userid = who " . ! " AND bug_when > '$start' " . ! " AND bug_when <= '$end' " . ! "ORDER BY bug_when" ); while (MoreSQLData()) { --- 381,394 ---- SendSQL("SELECT profiles.login_name, fielddefs.description, " . ! " issue_when, oldvalue, newvalue " . ! "FROM issues_activity, fielddefs, profiles " . ! "WHERE issue_id = $id " . ! " AND fielddefs.fieldid = issues_activity.fieldid " . " AND profiles.userid = who " . ! " AND issue_when > '$start' " . ! " AND issue_when <= '$end' " . ! "ORDER BY issue_when" ); while (MoreSQLData()) { *************** *** 416,451 **** my $resid = ! SendSQL("SELECT bugs_activity.bug_id, fielddefs.name, " . " oldvalue, newvalue " . ! "FROM bugs_activity, dependencies, fielddefs ". ! "WHERE bugs_activity.bug_id = dependencies.dependson " . " AND dependencies.blocked = $id " . ! " AND fielddefs.fieldid = bugs_activity.fieldid" . ! " AND (fielddefs.name = 'bug_status' " . " OR fielddefs.name = 'resolution') " . ! " AND bug_when > '$start' " . ! " AND bug_when <= '$end' " . ! "ORDER BY bug_when, bug_id"); my $thisdiff = ""; ! my $lastbug = ""; my $interestingchange = 0; while (MoreSQLData()) { ! my ($bug, $what, $old, $new) = (FetchSQLData()); ! if ($bug ne $lastbug) { if ($interestingchange) { $deptext .= $thisdiff; } ! $lastbug = $bug; $thisdiff = ! "\nThis bug depends on bug $bug, which changed state:\n\n"; $thisdiff .= FormatTriple("What ", "Old Value", "New Value"); $thisdiff .= ('-' x 76) . "\n"; $interestingchange = 0; } $thisdiff .= FormatTriple($fielddescription{$what}, $old, $new); ! if ($what eq 'bug_status' && IsOpenedState($old) ne IsOpenedState($new)) { $interestingchange = 1; } } --- 416,451 ---- my $resid = ! SendSQL("SELECT issues_activity.issue_id, fielddefs.name, " . " oldvalue, newvalue " . ! "FROM issues_activity, dependencies, fielddefs ". ! "WHERE issues_activity.issue_id = dependencies.dependson " . " AND dependencies.blocked = $id " . ! " AND fielddefs.fieldid = issues_activity.fieldid" . ! " AND (fielddefs.name = 'issue_status' " . " OR fielddefs.name = 'resolution') " . ! " AND issue_when > '$start' " . ! " AND issue_when <= '$end' " . ! "ORDER BY issue_when, issue_id"); my $thisdiff = ""; ! my $lastissue = ""; my $interestingchange = 0; while (MoreSQLData()) { ! my ($issue, $what, $old, $new) = (FetchSQLData()); ! if ($issue ne $lastissue) { if ($interestingchange) { $deptext .= $thisdiff; } ! $lastissue = $issue; $thisdiff = ! "\nThis issue depends on issue $issue, which changed state:\n\n"; $thisdiff .= FormatTriple("What ", "Old Value", "New Value"); $thisdiff .= ('-' x 76) . "\n"; $interestingchange = 0; } $thisdiff .= FormatTriple($fielddescription{$what}, $old, $new); ! if ($what eq 'issue_status' && IsOpenedState($old) ne IsOpenedState($new)) { $interestingchange = 1; } } *************** *** 481,488 **** $newcomments, $start, $id, 1); } ! SendSQL("UPDATE bugs SET lastdiffed = '$end', delta_ts = delta_ts " . ! "WHERE bug_id = $id"); } sub NewProcessOnePerson ($$\@\%\%\%$$$$) { --- 481,488 ---- $newcomments, $start, $id, 1); } ! SendSQL("UPDATE issues SET lastdiffed = '$end', delta_ts = delta_ts " . ! "WHERE issue_id = $id"); } sub NewProcessOnePerson ($$\@\%\%\%$$$$) { *************** *** 529,540 **** $seen{$person} = 1; ! # if this person doesn't have permission to see info on this bug, # return. # ! # XXX - I _think_ this currently means that if a bug is suddenly given # more restrictive permissions, people without those permissions won't ! # see the action of restricting the bug itself; the bug will just # quietly disappear from their radar. # if ($groupset ne $values{'groupset'}) { --- 529,540 ---- $seen{$person} = 1; ! # if this person doesn't have permission to see info on this issue, # return. # ! # XXX - I _think_ this currently means that if an issue is suddenly given # more restrictive permissions, people without those permissions won't ! # see the action of restricting the issue itself; the issue will just # quietly disappear from their radar. # if ($groupset ne $values{'groupset'}) { *************** *** 578,591 **** $person .= Param('emailsuffix'); # 09/13/2000 cyeh@bluemartini.com ! # If a bug is changed, don't put the word "Changed" in the subject mail ! # since if the bug didn't change, you wouldn't be getting mail ! # in the first place! see http://bugzilla.mozilla.org/show_bug.cgi?id=29820 # for details. $substs{"neworchanged"} = $isnew ? "New" : ""; $substs{"to"} = $person; $substs{"cc"} = ''; ! $substs{"bugid"} = $id; if ($isnew) { $substs{"diffs"} = $head . "\n\n" . $newcomments; } else { --- 578,591 ---- $person .= Param('emailsuffix'); # 09/13/2000 cyeh@bluemartini.com ! # If an issue is changed, don't put the word "Changed" in the subject mail ! # since if the issue didn't change, you wouldn't be getting mail ! # in the first place! see http://issuezilla.mozilla.org/show_bug.cgi?id=29820 # for details. $substs{"neworchanged"} = $isnew ? "New" : ""; $substs{"to"} = $person; $substs{"cc"} = ''; ! $substs{"issueid"} = $id; if ($isnew) { $substs{"diffs"} = $head . "\n\n" . $newcomments; } else { *************** *** 601,608 **** if (Param("sendmailnow")) { $sendmailparam = ""; } ! open(SENDMAIL, "|/usr/lib/sendmail $sendmailparam -t") || ! die "Can't open sendmail"; print SENDMAIL trim($msg) . "\n"; close SENDMAIL; --- 601,608 ---- if (Param("sendmailnow")) { $sendmailparam = ""; } ! open(SENDMAIL, "|/var/qmail/bin/qmail-inject -froot") || ## NPM -- removed "sendmailnow" param, not relevant to qmail ! die "Can't open /var/qmail/bin/qmail-inject"; print SENDMAIL trim($msg) . "\n"; close SENDMAIL; *************** *** 611,633 **** } ! sub ProcessOneBug { my $i = $_[0]; ! NewProcessOneBug($i); my $old = "shadow/$i"; my $new = "shadow/$i.tmp.$$"; my $diffs = "shadow/$i.diffs.$$"; my $verb = "Changed"; if (!stat($old)) { ! mkdir "shadow", 0777; ! chmod 0777, "shadow"; open(OLD, ">$old") || die "Couldn't create null $old"; close OLD; $verb = "New"; } ! my $text = GetBugText($i); if ($text eq "") { ! die "Couldn't find bug $i."; } open(FID, ">$new") || die "Couldn't create $new"; print FID $text; --- 611,633 ---- } ! sub ProcessOneIssue { my $i = $_[0]; ! NewProcessOneIssue($i); my $old = "shadow/$i"; my $new = "shadow/$i.tmp.$$"; my $diffs = "shadow/$i.diffs.$$"; my $verb = "Changed"; if (!stat($old)) { ! mkdir "shadow", 0700; ! chmod 0700, "shadow"; open(OLD, ">$old") || die "Couldn't create null $old"; close OLD; $verb = "New"; } ! my $text = GetIssueText($i); if ($text eq "") { ! die "Couldn't find issue $i."; } open(FID, ">$new") || die "Couldn't create $new"; print FID $text; *************** *** 635,656 **** if (Different($old, $new)) { system("diff -c -b $old $new > $diffs"); my $tolist = fixaddresses("to", ! [$::bug{'assigned_to'}, $::bug{'reporter'}, ! $::bug{'qa_contact'}]); my @combinedcc; ! foreach my $v (split(/,/, "$::bug{'cclist'},$::bug{'voterlist'}")) { push @combinedcc, $v; } push (@combinedcc, (@forcecc)); my $cclist = fixaddresses("cc", \@combinedcc); ! my $logstr = "Bug $i $verb"; if ($tolist ne "" || $cclist ne "") { my %substs; ! $substs{"fullbugreport"} = $text; # added ability to include the full bug report $substs{"to"} = $tolist; $substs{"cc"} = $cclist; ! $substs{"bugid"} = $i; $substs{"diffs"} = ""; open(DIFFS, "<$diffs") || die "Can't open $diffs"; while () { --- 635,656 ---- if (Different($old, $new)) { system("diff -c -b $old $new > $diffs"); my $tolist = fixaddresses("to", ! [$::issue{'assigned_to'}, $::issue{'reporter'}, ! $::issue{'qa_contact'}]); my @combinedcc; ! foreach my $v (split(/,/, "$::issue{'cclist'},$::issue{'voterlist'}")) { push @combinedcc, $v; } push (@combinedcc, (@forcecc)); my $cclist = fixaddresses("cc", \@combinedcc); ! my $logstr = "Issue $i $verb"; if ($tolist ne "" || $cclist ne "") { my %substs; ! $substs{"fullissuereport"} = $text; # added ability to include the full issue report $substs{"to"} = $tolist; $substs{"cc"} = $cclist; ! $substs{"issueid"} = $i; $substs{"diffs"} = ""; open(DIFFS, "<$diffs") || die "Can't open $diffs"; while () { *************** *** 658,664 **** } close DIFFS; $substs{"neworchanged"} = $verb; ! $substs{"summary"} = $::bug{'short_desc'}; my $msg = PerformSubsts(Param("changedmail"), \%substs); if (!$regenerate) { --- 658,664 ---- } close DIFFS; $substs{"neworchanged"} = $verb; ! $substs{"summary"} = $::issue{'short_desc'}; my $msg = PerformSubsts(Param("changedmail"), \%substs); if (!$regenerate) { *************** *** 669,675 **** $sendmailparam = ""; } open(SENDMAIL, ! "|/usr/lib/sendmail $sendmailparam -t") || die "Can't open sendmail"; print SENDMAIL $msg; --- 669,675 ---- $sendmailparam = ""; } open(SENDMAIL, ! "|/var/qmail/bin/qmail-inject -froot") || ## NPM -- removed "sendmailnow" param, not relevant to qmail die "Can't open sendmail"; print SENDMAIL $msg; *************** *** 693,699 **** } } rename($new, $old) || die "Can't rename $new to $old"; ! chmod 0666, $old; if ($regenerate) { print "$i "; } --- 693,699 ---- } } rename($new, $old) || die "Can't rename $new to $old"; ! chmod 0600, $old; if ($regenerate) { print "$i "; } *************** *** 718,730 **** if ($#ARGV >= 0 && $ARGV[0] eq "regenerate") { $regenerate = 1; shift @ARGV; ! SendSQL("select bug_id from bugs order by bug_id"); my @regenerate_list; while (my @row = FetchSQLData()) { push @regenerate_list, $row[0]; } foreach my $i (@regenerate_list) { ! ProcessOneBug($i); Unlock(); Lock(); } --- 718,730 ---- if ($#ARGV >= 0 && $ARGV[0] eq "regenerate") { $regenerate = 1; shift @ARGV; ! SendSQL("select issue_id from issues order by issue_id"); my @regenerate_list; while (my @row = FetchSQLData()) { push @regenerate_list, $row[0]; } foreach my $i (@regenerate_list) { ! ProcessOneIssue($i); Unlock(); Lock(); } *************** *** 740,746 **** } if (($#ARGV < 0) || ($#ARGV > 1)) { ! print "Usage error: processmail {bugid} {nametoexclude}\nOr: processmail regenerate\n"; exit; } --- 740,746 ---- } if (($#ARGV < 0) || ($#ARGV > 1)) { ! print "Usage error: processmail {issueid} {nametoexclude}\nOr: processmail regenerate\n"; exit; } *************** *** 749,767 **** } if ($ARGV[0] eq "rescanall") { ! print "
Collecting bug ids...\n"; ! SendSQL("select bug_id from bugs where to_days(now()) - to_days(delta_ts) <= 2 order by bug_id"); my @list; while (my @row = FetchSQLData()) { push @list, $row[0]; } foreach my $id (@list) { $ARGV[0] = $id; ! print "
Doing bug $id\n"; ! ProcessOneBug($ARGV[0]); } } else { ! ProcessOneBug($ARGV[0]); } exit; --- 749,767 ---- } if ($ARGV[0] eq "rescanall") { ! print "
Collecting issue ids...\n"; ! SendSQL("select issue_id from issues where to_days(now()) - to_days(delta_ts) <= 2 order by issue_id"); my @list; while (my @row = FetchSQLData()) { push @list, $row[0]; } foreach my $id (@list) { $ARGV[0] = $id; ! print "
Doing issue $id\n"; ! ProcessOneIssue($ARGV[0]); } } else { ! ProcessOneIssue($ARGV[0]); } exit; Index: query.cgi =================================================================== RCS file: /cvsroot/mozilla/webtools/bugzilla/query.cgi,v retrieving revision 1.74 diff -c -r1.74 query.cgi *** query.cgi 2000/09/13 22:04:30 1.74 --- query.cgi 2000/09/29 04:57:12 *************** *** 1,4 **** ! #!/usr/bonsaitools/bin/perl -w # -*- Mode: perl; indent-tabs-mode: nil -*- # # The contents of this file are subject to the Mozilla Public --- 1,4 ---- ! #!/usr/bin/perl -w # -*- Mode: perl; indent-tabs-mode: nil -*- # # The contents of this file are subject to the Mozilla Public *************** *** 11,17 **** # 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 --- 11,17 ---- # implied. See the License for the specific language governing # rights and limitations under the License. # ! # The Original Code is the Issuezilla Issue Tracking System. # # The Initial Developer of the Original Code is Netscape Communications # Corporation. Portions created by Netscape are *************** *** 36,49 **** use vars @::CheckOptionValues, @::legal_resolution, ! @::legal_bug_status, @::legal_components, @::legal_keywords, @::legal_opsys, @::legal_platform, @::legal_priority, @::legal_product, ! @::legal_severity, @::legal_target_milestone, @::legal_versions, @::log_columns, --- 36,49 ---- use vars @::CheckOptionValues, @::legal_resolution, ! @::legal_issue_status, @::legal_components, @::legal_keywords, @::legal_opsys, @::legal_platform, @::legal_priority, @::legal_product, ! @::legal_issue_type, @::legal_target_milestone, @::legal_versions, @::log_columns, *************** *** 60,67 **** quietly_check_login(); } my $userid = 0; ! if (defined $::COOKIE{"Bugzilla_login"}) { ! $userid = DBNameToIdAndCheck($::COOKIE{"Bugzilla_login"}); } # Backwards compatability hack -- if there are any of the old QUERY_* --- 60,67 ---- quietly_check_login(); } my $userid = 0; ! if (defined $::COOKIE{"Issuezilla_login"}) { ! $userid = DBNameToIdAndCheck($::COOKIE{"Issuezilla_login"}); } # Backwards compatability hack -- if there are any of the old QUERY_* *************** *** 122,129 **** sub ProcessFormStuff { my ($buf) = (@_); my $foundone = 0; ! foreach my $name ("bug_status", "resolution", "assigned_to", ! "rep_platform", "priority", "bug_severity", "product", "reporter", "op_sys", "component", "version", "chfield", "chfieldfrom", "chfieldto", "chfieldvalue", --- 122,129 ---- sub ProcessFormStuff { my ($buf) = (@_); my $foundone = 0; ! foreach my $name ("issue_status", "resolution", "assigned_to", ! "rep_platform", "priority", "issue_type", "product", "reporter", "op_sys", "component", "version", "chfield", "chfieldfrom", "chfieldto", "chfieldvalue", *************** *** 134,143 **** "emailassigned_to2", "emailcc2", "emailqa_contact2", "emaillongdesc2", "changedin", "votes", "short_desc", "short_desc_type", ! "long_desc", "long_desc_type", "bug_file_loc", ! "bug_file_loc_type", "status_whiteboard", ! "status_whiteboard_type", "bug_id", ! "bugidtype", "keywords", "keywords_type") { $default{$name} = ""; $type{$name} = 0; } --- 134,143 ---- "emailassigned_to2", "emailcc2", "emailqa_contact2", "emaillongdesc2", "changedin", "votes", "short_desc", "short_desc_type", ! "long_desc", "long_desc_type", "issue_file_loc", ! "issue_file_loc_type", "status_whiteboard", ! "status_whiteboard_type", "issue_id", ! "issueidtype", "keywords", "keywords_type") { $default{$name} = ""; $type{$name} = 0; } *************** *** 185,191 **** ! print "Set-Cookie: BUGLIST= Content-type: text/html\n\n"; GetVersionTable(); --- 185,191 ---- ! print "Set-Cookie: ISSUELIST= Content-type: text/html\n\n"; GetVersionTable(); *************** *** 274,289 **** my $emailinput1 = GenerateEmailInput(1); my $emailinput2 = GenerateEmailInput(2); ! # if using usebuggroups, then we don't want people to see products they don't # have access to. remove them from the list. @::product_list = (); foreach my $p (@::legal_product) { ! if(Param("usebuggroupsentry") && GroupExists($p) && !UserInGroup($p)) { ! # If we're using bug groups to restrict entry on products, and ! # this product has a bug group, and the user is not in that # group, we don't want to include that product in this list. next; } --- 274,289 ---- my $emailinput1 = GenerateEmailInput(1); my $emailinput2 = GenerateEmailInput(2); ! # if using useissuegroups, then we don't want people to see products they don't # have access to. remove them from the list. @::product_list = (); foreach my $p (@::legal_product) { ! if(Param("useissuegroupsentry") && GroupExists($p) && !UserInGroup($p)) { ! # If we're using issue groups to restrict entry on products, and ! # this product has an issue group, and the user is not in that # group, we don't want to include that product in this list. next; } *************** *** 489,528 **** # set legal_product [concat $default{"product"} [lreplace $legal_product $w $w]] # } ! PutHeader("Bugzilla Query Page", "Query", ! "This page lets you search the database for recorded bugs.", q{onLoad="selectProduct(document.forms[0]);"}, 0, $jscript); push @::legal_resolution, "---"; # Oy, what a hack. ! my @logfields = ("[Bug creation]", @::log_columns); print qq{
- - ! }; print " - -
Status: Resolution:Platform:OpSys: Priority:Severity:
! ! @{[make_selection_widget(\"bug_status\",\@::legal_bug_status,$default{'bug_status'}, $type{'bug_status'}, 1)]} ! @{[make_selection_widget(\"resolution\",\@::legal_resolution,$default{'resolution'}, $type{'resolution'}, 1)]} @{[make_selection_widget(\"rep_platform\",\@::legal_platform,$default{'platform'}, $type{'platform'}, 1)]} --- 489,579 ---- # set legal_product [concat $default{"product"} [lreplace $legal_product $w $w]] # } ! PutHeader("Issuezilla Query Page", "Query", ! "This page lets you search the database for recorded issues.", q{onLoad="selectProduct(document.forms[0]);"}, 0, $jscript); push @::legal_resolution, "---"; # Oy, what a hack. ! my @logfields = ("[Issue creation]", @::log_columns); print qq{ + + + + + + + + }; + + print " + "; + + print qq{ + + + + + + +
Issue type:Product:Component:
+ @{[make_selection_widget(\"issue_type\",\@::legal_issue_type,$default{'issue_type'}, $type{'issue_type'}, 1)]} + + + + + +
+ + + ! }; print " + + + +
Status: Resolution: Priority:
! @{[make_selection_widget(\"issue_status\",\@::legal_issue_status,$default{'issue_status'}, $type{'issue_status'}, 1)]} @{[make_selection_widget(\"resolution\",\@::legal_resolution,$default{'resolution'}, $type{'resolution'}, 1)]} + + @{[make_selection_widget(\"priority\",\@::legal_priority,$default{'priority'}, $type{'priority'}, 1)]}
+ + + + + + + + "; + + if (Param("usetargetmilestone")) { + print ""; + } + + print " + + +
PlatformOpSysVersion:Target Milestone:
@{[make_selection_widget(\"rep_platform\",\@::legal_platform,$default{'platform'}, $type{'platform'}, 1)]} *************** *** 531,546 **** @{[make_selection_widget(\"op_sys\",\@::legal_opsys,$default{'op_sys'}, $type{'op_sys'}, 1)]} ! @{[make_selection_widget(\"priority\",\@::legal_priority,$default{'priority'}, $type{'priority'}, 1)]} ! ! @{[make_selection_widget(\"bug_severity\",\@::legal_severity,$default{'bug_severity'}, $type{'bug_severity'}, 1)]}
-

--- 582,606 ---- @{[make_selection_widget(\"op_sys\",\@::legal_opsys,$default{'op_sys'}, $type{'op_sys'}, 1)]} + "; ! if (Param("usetargetmilestone")) { ! print " "; ! } + print "
! ! ! !

*************** *** 554,574 **** my $exclselected = ""; ! if ($default{'bugidtype'} eq "exclude") { $inclselected = ""; $exclselected = "SELECTED"; } ! my $bug_id = value_quote($default{'bug_id'}); print qq{ }; --- 614,634 ---- my $exclselected = ""; ! if ($default{'issueidtype'} eq "exclude") { $inclselected = ""; $exclselected = "SELECTED"; } ! my $issue_id = value_quote($default{'issue_id'}); print qq{ }; *************** *** 603,653 ****
! ! bugs numbered: !
! ! issues numbered: !
- -

- - - - - - - "; - - if (Param("usetargetmilestone")) { - print ""; - } - - print " - - - - - - - - "; - - if (Param("usetargetmilestone")) { - print " - "; - } sub StringSearch { my ($desc, $name) = (@_); --- 663,670 ----
Program:Version:Component:Target Milestone:
- - - - - - - -
+

"; sub StringSearch { my ($desc, $name) = (@_); *************** *** 688,694 **** StringSearch("Summary", "short_desc"); StringSearch("A description entry", "long_desc"); ! StringSearch("URL", "bug_file_loc"); if (Param("usestatuswhiteboard")) { StringSearch("Status whiteboard", "status_whiteboard"); --- 705,711 ---- StringSearch("Summary", "short_desc"); StringSearch("A description entry", "long_desc"); ! StringSearch("URL", "issue_file_loc"); if (Param("usestatuswhiteboard")) { StringSearch("Status whiteboard", "status_whiteboard"); *************** *** 870,876 **** "; my $deforder = "'Importance'"; ! my @orders = ('Bug Number', $deforder, 'Assignee'); if ($::COOKIE{'LASTORDER'}) { $deforder = "Reuse same sort as last time"; --- 887,893 ---- "; my $deforder = "'Importance'"; ! my @orders = ('Issue Number', $deforder, 'Assignee'); if ($::COOKIE{'LASTORDER'}) { $deforder = "Reuse same sort as last time"; *************** *** 899,918 **** if (UserInGroup("tweakparams")) { ! print "Edit Bugzilla operating parameters
\n"; } if (UserInGroup("editcomponents")) { ! print "Edit Bugzilla products and components
\n"; } if (UserInGroup("editkeywords")) { ! print "Edit Bugzilla keywords
\n"; } if ($userid) { ! print "Log in as someone besides $::COOKIE{'Bugzilla_login'}
\n"; } print "Change your password or preferences.
\n"; ! print "Report a new bug.
\n"; ! print "Open a new Bugzilla account
\n"; ! print "Bug reports
\n"; PutFooter(); --- 916,935 ---- if (UserInGroup("tweakparams")) { ! print "Edit Issuezilla operating parameters
\n"; } if (UserInGroup("editcomponents")) { ! print "Edit Issuezilla products and components
\n"; } if (UserInGroup("editkeywords")) { ! print "Edit Issuezilla keywords
\n"; } if ($userid) { ! print "Log in as someone besides $::COOKIE{'Issuezilla_login'}
\n"; } print "Change your password or preferences.
\n"; ! print "Report a new issue.
\n"; ! print "Open a new Issuezilla account
\n"; ! print "Issue reports
\n"; PutFooter(); Index: relogin.cgi =================================================================== RCS file: /cvsroot/mozilla/webtools/bugzilla/relogin.cgi,v retrieving revision 1.10 diff -c -r1.10 relogin.cgi *** relogin.cgi 2000/01/18 14:41:00 1.10 --- relogin.cgi 2000/09/29 04:57:12 *************** *** 1,4 **** ! #!/usr/bonsaitools/bin/perl -w # -*- Mode: perl; indent-tabs-mode: nil -*- # # The contents of this file are subject to the Mozilla Public --- 1,4 ---- ! #!/usr/bin/perl -w # -*- Mode: perl; indent-tabs-mode: nil -*- # # The contents of this file are subject to the Mozilla Public *************** *** 11,17 **** # 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 --- 11,17 ---- # implied. See the License for the specific language governing # rights and limitations under the License. # ! # The Original Code is the Issuezilla Issue Tracking System. # # The Initial Developer of the Original Code is Netscape Communications # Corporation. Portions created by Netscape are *************** *** 28,36 **** require "CGI.pl"; ! print "Set-Cookie: Bugzilla_login= ; path=/; expires=Sun, 30-Jun-80 00:00:00 GMT ! Set-Cookie: Bugzilla_logincookie= ; 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 "; --- 28,36 ---- require "CGI.pl"; ! print "Set-Cookie: Issuezilla_login= ; path=/; expires=Sun, 30-Jun-80 00:00:00 GMT ! Set-Cookie: Issuezilla_logincookie= ; path=/; expires=Sun, 30-Jun-80 00:00:00 GMT ! Set-Cookie: Issuezilla_password= ; path=/; expires=Sun, 30-Jun-80 00:00:00 GMT Content-type: text/html "; *************** *** 42,48 ****

"; ! delete $::COOKIE{"Bugzilla_login"}; PutFooter(); --- 42,48 ----

"; ! delete $::COOKIE{"Issuezilla_login"}; PutFooter(); Index: reports.cgi =================================================================== RCS file: /cvsroot/mozilla/webtools/bugzilla/reports.cgi,v retrieving revision 1.36 diff -c -r1.36 reports.cgi *** reports.cgi 2000/08/07 22:59:54 1.36 --- reports.cgi 2000/09/29 04:57:12 *************** *** 1,4 **** ! #!/usr/bonsaitools/bin/perl -w # -*- Mode: perl; indent-tabs-mode: nil -*- # # The contents of this file are subject to the Mozilla Public --- 1,4 ---- ! #!/usr/bin/perl -w # -*- Mode: perl; indent-tabs-mode: nil -*- # # The contents of this file are subject to the Mozilla Public *************** *** 11,17 **** # 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 --- 11,17 ---- # implied. See the License for the specific language governing # rights and limitations under the License. # ! # The Original Code is the Issuezilla Issue Tracking System. # # The Initial Developer of the Original Code is Netscape Communications # Corporation. Portions created by Netscape are *************** *** 26,32 **** # list with 2 positive and 1 negative choice), default links on, add show # sql comment. # Joe Robins , ! # If using the usebuggroups parameter, users shouldn't be able to see # reports for products they don't have access to. use diagnostics; --- 26,32 ---- # list with 2 positive and 1 negative choice), default links on, add show # sql comment. # Joe Robins , ! # If using the useissuegroups parameter, users shouldn't be able to see # reports for products they don't have access to. use diagnostics; *************** *** 42,48 **** my $dir = "data/mining"; my $week = 60 * 60 * 24 * 7; my @status = qw (NEW ASSIGNED REOPENED); ! my %bugsperperson; # while this looks odd/redundant, it allows us to name # functions differently than the value passed in --- 42,48 ---- my $dir = "data/mining"; my $week = 60 * 60 * 24 * 7; my @status = qw (NEW ASSIGNED REOPENED); ! my %issuesperperson; # while this looks odd/redundant, it allows us to name # functions differently than the value passed in *************** *** 55,86 **** "show_chart" => \&show_chart, ); ! # If we're using bug groups for products, we should apply those restrictions # to viewing reports, as well. Time to check the login in that case. quietly_check_login(); print "Content-type: text/html\n"; #Changing attachment to inline to resolve 46897 #zach@zachlipton.com ! print "Content-disposition: inline; filename=bugzilla_report.html\n\n"; # If we're here for the first time, give a banner. Else respect the banner flag. if ( (!defined $::FORM{'product'}) || ($::FORM{'banner'}) ) { ! PutHeader ("Bug Reports") } else { ! print("Bug Reports"); } ConnectToDatabase(1); GetVersionTable(); ! # If the usebuggroups parameter is set, we don't want to list all products. # We only want those products that the user has permissions for. my @myproducts; ! if(Param("usebuggroups")) { push( @myproducts, "-All-"); foreach my $this_product (@::legal_product) { if(GroupExists($this_product) && !UserInGroup($this_product)) { --- 55,86 ---- "show_chart" => \&show_chart, ); ! # If we're using issue groups for products, we should apply those restrictions # to viewing reports, as well. Time to check the login in that case. quietly_check_login(); print "Content-type: text/html\n"; #Changing attachment to inline to resolve 46897 #zach@zachlipton.com ! print "Content-disposition: inline; filename=issuezilla_report.html\n\n"; # If we're here for the first time, give a banner. Else respect the banner flag. if ( (!defined $::FORM{'product'}) || ($::FORM{'banner'}) ) { ! PutHeader ("Issue Reports") } else { ! print("Issue Reports"); } ConnectToDatabase(1); GetVersionTable(); ! # If the useissuegroups parameter is set, we don't want to list all products. # We only want those products that the user has permissions for. my @myproducts; ! if(Param("useissuegroups")) { push( @myproducts, "-All-"); foreach my $this_product (@::legal_product) { if(GroupExists($this_product) && !UserInGroup($this_product)) { *************** *** 101,109 **** } else { ! # If usebuggroups is on, we don't want people to be able to view # reports for products they don't have permissions for... ! if(Param("usebuggroups") && GroupExists($::FORM{'product'}) && !UserInGroup($::FORM{'product'})) { print "

Permission denied.

\n"; --- 101,109 ---- } else { ! # If useissuegroups is on, we don't want people to be able to view # reports for products they don't have permissions for... ! if(Param("useissuegroups") && GroupExists($::FORM{'product'}) && !UserInGroup($::FORM{'product'})) { print "

Permission denied.

\n"; *************** *** 154,166 **** sub choose_product { my $product_popup = make_options (\@myproducts, $myproducts[0]); ! my $charts = defined $Chart::Lines::VERSION && -d $dir ? "