summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorterry%netscape.com <>1998-12-04 01:10:51 +0100
committerterry%netscape.com <>1998-12-04 01:10:51 +0100
commit3a14063761783372a378677b9901ec683d691294 (patch)
treed2265af7643087e1aaa5281b0749990e9e9eab43
parent063b0985a9417a2e1252552cde3124b3b3a7e289 (diff)
downloadbugzilla-3a14063761783372a378677b9901ec683d691294.tar.gz
bugzilla-3a14063761783372a378677b9901ec683d691294.tar.xz
Reworked the rep_platform and op_sys fields. BEWARE; this includes
some changes to the database schema!
-rw-r--r--CHANGES45
-rwxr-xr-xbug_status.html7
-rwxr-xr-xenter_bug.cgi9
-rw-r--r--globals.pl7
-rwxr-xr-xmakebugtable.sh4
5 files changed, 60 insertions, 12 deletions
diff --git a/CHANGES b/CHANGES
index d3f6e4a23..59cd6c3a8 100644
--- a/CHANGES
+++ b/CHANGES
@@ -9,6 +9,51 @@ query the CVS tree. For example,
will tell you what has been changed in the last week.
+12/2/98 The op_sys and rep_platform fields have been tweaked. op_sys
+is now an enum, rather than having the legal values all hard-coded in
+perl. rep_platform now no longer allows a value of "X-Windows".
+
+Here's how I ported to the new world. This ought to work for you too.
+Actually, it's probably overkill. I had a lot of illegal values for op_sys
+in my tables, from importing bugs from strange places. If you haven't done
+anything funky, then much of the below will be a no-op.
+
+First, send the following commands to MySQL to make sure all your values for
+rep_platform and op_sys are legal in the new world..
+
+ update bugs set rep_platform="Sun" where rep_platform="X-Windows" and op_sys like "Solaris%";
+ update bugs set rep_platform="SGI" where rep_platform="X-Windows" and op_sys = "IRIX";
+ update bugs set rep_platform="SGI" where rep_platform="X-Windows" and op_sys = "HP-UX";
+ update bugs set rep_platform="DEC" where rep_platform="X-Windows" and op_sys = "OSF/1";
+ update bugs set rep_platform="PC" where rep_platform="X-Windows" and op_sys = "Linux";
+ update bugs set rep_platform="other" where rep_platform="X-Windows";
+ update bugs set rep_platform="other" where rep_platform="";
+ update bugs set op_sys="Mac System 7" where op_sys="System 7";
+ update bugs set op_sys="Mac System 7.5" where op_sys="System 7.5";
+ update bugs set op_sys="Mac System 8.0" where op_sys="8.0";
+ update bugs set op_sys="OSF/1" where op_sys="Digital Unix 4.0";
+ update bugs set op_sys="IRIX" where op_sys like "IRIX %";
+ update bugs set op_sys="HP-UX" where op_sys like "HP-UX %";
+ update bugs set op_sys="Windows NT" where op_sys like "NT %";
+ update bugs set op_sys="OSF/1" where op_sys like "OSF/1 %";
+ update bugs set op_sys="Solaris" where op_sys like "Solaris %";
+ update bugs set op_sys="SunOS" where op_sys like "SunOS%";
+ update bugs set op_sys="other" where op_sys = "Motif";
+ update bugs set op_sys="other" where op_sys = "Other";
+
+Next, send the following commands to make sure you now have only legal
+entries in your table. If either of the queries do not come up empty, then
+you have to do more stuff like the above.
+
+ select bug_id,op_sys,rep_platform from bugs where rep_platform not regexp "^(All|DEC|HP|Macintosh|PC|SGI|Sun|X-Windows|Other)$";
+ select bug_id,op_sys,rep_platform from bugs where op_sys not regexp "^(All|Windows 3.1|Windows 95|Windows 98|Windows NT|Mac System 7|Mac System 7.5|Mac System 7.1.6|Mac System 8.0|AIX|BSDI|HP-UX|IRIX|Linux|OSF/1|Solaris|SunOS|other)$";
+
+Finally, once that's all clear, alter the table to make enforce the new legal
+entries:
+
+ alter table bugs change column op_sys op_sys enum("All", "Windows 3.1", "Windows 95", "Windows 98", "Windows NT", "Mac System 7", "Mac System 7.5", "Mac System 7.1.6", "Mac System 8.0", "AIX", "BSDI", "HP-UX", "IRIX", "Linux", "OSF/1", "Solaris", "SunOS", "other") not null, change column rep_platform rep_platform enum("All", "DEC", "HP", "Macintosh", "PC", "SGI", "Sun", "Other");
+
+
10/27/98 security check for legal products in place. bug charts are not
available as an option if collectstats.pl has never been run. all products
get daily stats collected now. README updated: Chart::Base is listed as
diff --git a/bug_status.html b/bug_status.html
index fff558558..1f429fe9b 100755
--- a/bug_status.html
+++ b/bug_status.html
@@ -159,14 +159,15 @@ Most bugs should have area set to <B>CODE</B>. Legal values include:
<LI> l10n <i>(localization)</i>
</UL>
<a name="rep_platform"><h2>Platform</h2></a>
-This is the platform against which the bug was reported. Legal
+This is the hardware platform against which the bug was reported. Legal
platforms include:
<UL>
<LI> All (happens on all platform; cross-platform bug)
<LI> Macintosh
<LI> PC
-<LI> X-Windows
+<LI> Sun
+<LI> HP
</UL>
<b>Note:</b> Selecting the option "All" does not select bugs assigned against all platforms. It
@@ -189,6 +190,6 @@ status field appropriately.
<hr>
<address><a href="http://home.netscape.com/people/terry/">Terry Weissman &lt;terry@netscape.com&gt;</a></address>
<!-- hhmts start -->
-Last modified: Tue Aug 25 23:11:26 1998
+Last modified: Wed Dec 2 14:08:58 1998
<!-- hhmts end -->
</body> </html>
diff --git a/enter_bug.cgi b/enter_bug.cgi
index 529c394b8..6c41d1e97 100755
--- a/enter_bug.cgi
+++ b/enter_bug.cgi
@@ -78,12 +78,17 @@ sub pickplatform {
return $value;
}
for ($ENV{'HTTP_USER_AGENT'}) {
- /Mozilla.*\(X11/ && do {return "X-Windows";};
/Mozilla.*\(Windows/ && do {return "PC";};
/Mozilla.*\(Macintosh/ && do {return "Macintosh";};
/Mozilla.*\(Win/ && do {return "PC";};
+ /Mozilla.*Linux.*86/ && do {return "PC";};
+ /Mozilla.*Linux.*alpha/ && do {return "DEC";};
+ /Mozilla.*OSF/ && do {return "DEC";};
+ /Mozilla.*HP-UX/ && do {return "HP";};
+ /Mozilla.*IRIX/ && do {return "SGI";};
+ /Mozilla.*(SunOS|Solaris)/ && do {return "Sun";};
# default
- return "PC";
+ return "Other";
}
}
diff --git a/globals.pl b/globals.pl
index 4c5975055..3c8bf252a 100644
--- a/globals.pl
+++ b/globals.pl
@@ -71,10 +71,6 @@ sub FetchOneColumn {
}
-@::legal_opsys = ("Windows 3.1", "Windows 95", "Windows NT", "System 7",
- "System 7.5", "7.1.6", "AIX", "BSDI", "HP-UX", "IRIX",
- "Linux", "OSF/1", "Solaris", "SunOS", "other");
-
@::default_column_list = ("severity", "priority", "platform", "owner",
"status", "resolution", "summary");
@@ -255,6 +251,7 @@ sub GenerateVersionTable {
@::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"});
@::legal_resolution_no_dup = @::legal_resolution;
@@ -283,7 +280,7 @@ sub GenerateVersionTable {
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',
+ foreach my $i('product', 'priority', 'severity', 'platform', 'opsys',
'bug_status', 'resolution', 'resolution_no_dup') {
print FID GenerateCode('@::legal_' . $i);
}
diff --git a/makebugtable.sh b/makebugtable.sh
index ff0cc78c1..7f515ebe3 100755
--- a/makebugtable.sh
+++ b/makebugtable.sh
@@ -37,10 +37,10 @@ creation_ts datetime,
delta_ts timestamp,
short_desc mediumtext,
long_desc mediumtext,
-op_sys tinytext,
+op_sys enum("All", "Windows 3.1", "Windows 95", "Windows 98", "Windows NT", "Mac System 7", "Mac System 7.5", "Mac System 7.1.6", "Mac System 8.0", "AIX", "BSDI", "HP-UX", "IRIX", "Linux", "OSF/1", "Solaris", "SunOS", "other") not null,
priority enum("P1", "P2", "P3", "P4", "P5") not null,
product varchar(16) not null,
-rep_platform enum("All", "DEC", "HP", "Macintosh", "PC", "SGI", "Sun", "X-Windows", "Other"),
+rep_platform enum("All", "DEC", "HP", "Macintosh", "PC", "SGI", "Sun", "Other"),
reporter mediumint not null,
version varchar(16) not null,
area enum("BUILD", "CODE", "CONTENT", "DOC", "PERFORMANCE", "TEST", "UI", "i18n", "l10n") not null,