Received: (from majordom@localhost) by hyperreal.com (8.8.5/8.8.5) id DAA07857; Thu, 1 May 1997 03:39:53 -0700 (PDT) Received: (from coar@localhost) by hyperreal.com (8.8.5/8.8.5) id DAA07851 for apache-cvs; Thu, 1 May 1997 03:39:51 -0700 (PDT) Date: Thu, 1 May 1997 03:39:51 -0700 (PDT) From: Rodent of Unusual Size Message-Id: <199705011039.DAA07851@hyperreal.com> To: apache-cvs@hyperreal.com Subject: cvs commit: apache-site bugdb.cgi Sender: apache-cvs-owner@apache.org Precedence: bulk Reply-To: new-httpd@apache.org coar 97/05/01 03:39:51 Modified: . bugdb.cgi Log: Enhancements to bug reporting WWW form: o add warning about public nature of PR db o add searchability by PR class and severity o add ability to change both of above when editing o add PR # to HTML and <H1> on full display o translate CRs into newlines in multi-line fields o force flush of HTTP headers o request "uname -a" on entry form o require non-blank values for Environment, email, Category, and Description o fix '@' escaping bug Reviewed by: Roy Fielding, Dean Gaudet Revision Changes Path 1.2 +89 -13 apache-site/bugdb.cgi Index: bugdb.cgi =================================================================== RCS file: /export/home/cvs/apache-site/bugdb.cgi,v retrieving revision 1.1 retrieving revision 1.2 diff -C3 -r1.1 -r1.2 *** bugdb.cgi 1997/03/25 04:43:15 1.1 --- bugdb.cgi 1997/05/01 10:39:49 1.2 *************** *** 87,107 **** --- 87,114 ---- # The first field is the restriction, the second field is the default option %quickrestr = ( "Category", "any", + "Severity", "any", "Responsible", "any", # "Originator", "any", + "Class", "any", "State", "open", ); # Defines order of quick output restrictions @quickrestr = ( "Category", + "Severity", "Responsible", # "Originator", + "Class", "State", ); #################### Main routine # Main Program + select (STDOUT); + $| = 1; print "Content-type: text/html\n\n"; + $| = 0; print "<HTML>\n"; #&read_originator; *************** *** 166,172 **** ### Main menu } elsif ($PATH_INFO eq "") { &main_menu(); ! print"<HR><SMALL>Version: 24 Aug 96<BR>Authors: <A HREF=\"http://alumni.caltech.edu/~dank\">Dan Kegel</A> dank\@alumni.caltech.edu & <A HREF=\"http://alumni.caltech.edu/~huyle/\">Huy Le</A> huyle\@alumni.caltech.edu, with revamp work by <A HREF=\"http://www.organic.com\">Brian Behlendorf</A> brian@organic.com.</SMALL>\n"; } else { print "<head><title>SPR Front End

SPR Front End

--- 173,179 ---- ### Main menu } elsif ($PATH_INFO eq "") { &main_menu(); ! print"
Version: 24 Aug 96
Authors: Dan Kegel dank\@alumni.caltech.edu & Huy Le huyle\@alumni.caltech.edu, with revamp work by Brian Behlendorf brian\@organic.com.
\n"; } else { print "SPR Front End

SPR Front End

*************** *** 250,256 **** # Sends the new PR sub handle_send_pr { # Display title ! print "New Problem Report submission"; # Get arguments local($_)=scalar(); --- 257,263 ---- # Sends the new PR sub handle_send_pr { # Display title ! print "Apache: New Problem Report Submission"; # Get arguments local($_)=scalar(); *************** *** 263,282 **** $value = &cgi_trans($value); # By convention, multi-line fields have newlines at end of # each line. I think some browsers forget the last newline? ! if ($fieldnames_multi{$key} > 0 && $value !~ /\n$/) { ! $value .= "\n"; } $fieldvalues{$key}=$value; } # Verify arguments ! local($field); ! foreach $field ("Category") { ! if ($fieldvalues{$field} eq "") { ! print "

Your problem report has not been sent.

\n"; ! print "You must select a $field.\n"; ! return; } } # kludge --- 270,309 ---- $value = &cgi_trans($value); # By convention, multi-line fields have newlines at end of # each line. I think some browsers forget the last newline? ! if ($fieldnames_multi{$key} > 0) { ! # ! # Convert any CR-LFs or CRs to \n (different browsers use ! # different line terminators). ! # ! $value =~ s/\r\n/\n/g; ! $value =~ s/\r/\n/g; ! if ($value !~ /\n$/) { ! $value .= "\n"; ! } } $fieldvalues{$key}=$value; } # Verify arguments ! local($field, $ok, @emsgs) = (0, 1); ! foreach $field ("Synopsis", "emailaddr", "Environment", "Category", "Description") { ! local ($fieldval) = $fieldvalues{$field}; ! $fieldval =~ s/\s//g; ! if ($fieldval eq "") { ! push (@emsgs, $field); ! $ok = 0; ! } ! } ! if (! $ok) { ! print "

Problem report not sent!

\n"; ! print "Your problem report is missing required information:\n"; ! print "
    \n"; ! foreach $field (@emsgs) { ! print "
  • $field\n
  • \n"; } + print "
"; + print "

Please go back to the form and correct this.

\n"; + return; } # kludge *************** *** 307,315 **** sub send_pr { # Display title ! print "New Problem Report submission

New Problem Report form:

"; print "
\n"; --- 334,350 ---- sub send_pr { # Display title ! print "Apache: New Problem Report submission

New Problem Report form:

+
+ + Please be aware that the Apache problem report database is PUBLICLY + ACCESSIBLE. The information you submit on this form will be available to + anyone on the Internet. Do not send information that you wish to remain + private. + +
"; print "\n"; *************** *** 363,369 **** print < ! Environment - What operating system, at what patchlevel? What compiler? Etc.

Synopsis - a brief description of the problem at hand.

--- 398,405 ---- print < ! Environment - What operating system, at what patchlevel? ! What compiler? Etc. (The output from uname -a is very useful.)

Synopsis - a brief description of the problem at hand.

*************** *** 488,493 **** --- 524,547 ---- $fieldvalues{'State'} = $input{'State'}; } + if ($input{"Class"} ne $fieldvalues{'Class'}) { + $change_msg .= "Class-Changed-From-To: $fieldvalues{'Class'}-$input{'Class'} + Class-Changed-By: $input{'Editor'} + Class-Changed-When: $date + "; + $to_old = $to_subm = 1; + $fieldvalues{'Class'} = $input{'Class'}; + } + + if ($input{"Severity"} ne $fieldvalues{'Severity'}) { + $change_msg .= "Severity-Changed-From-To: $fieldvalues{'Severity'}-$input{'Severity'} + Severity-Changed-By: $input{'Editor'} + Severity-Changed-When: $date + "; + $to_old = $to_subm = 1; + $fieldvalues{'Severity'} = $input{'Severity'}; + } + #print "if ($input{'Responsible'} ne $oldresp)\n"; if ($input{'Responsible'} ne $oldresp) { if ($input{'ResponsibleReason'} eq "") { *************** *** 633,638 **** --- 687,694 ---- local($oldsyn) = $fieldvalues{"Synopsis"}; local($oldstate) = $fieldvalues{"State"}; local($oldresp) = $fieldvalues{"Responsible"}; + local($oldclass) = $fieldvalues{"Class"}; + local($oldsev) = $fieldvalues{"Severity"}; $oldresp =~ s/\s*\(.*$//; # Get rid of comment in responsible party name local($timestamp)=×tamp($fullpr); *************** *** 662,667 **** --- 718,743 ---- } print "
\n"; + print " +
Class: +

\n"; + + print " +
Severity: +

\n"; + print "
New state:\n"; print "
"; print "