summaryrefslogtreecommitdiffstats
path: root/checksetup.pl
diff options
context:
space:
mode:
authorbugreport%peshkin.net <>2004-08-21 06:49:17 +0200
committerbugreport%peshkin.net <>2004-08-21 06:49:17 +0200
commit88d26275229b5f52f435130496169766313c87b7 (patch)
treec71532045500b6e2335b1e5e2512d10b8846551b /checksetup.pl
parent2f9f28d0bfb1f321d1548844a41aaf2d51789695 (diff)
downloadbugzilla-88d26275229b5f52f435130496169766313c87b7.tar.gz
bugzilla-88d26275229b5f52f435130496169766313c87b7.tar.xz
Bug 224208 Add a higher level of categorization (.ie departments, locations, etc.)
patch by Albert Ting r=joel, glob a=myk
Diffstat (limited to 'checksetup.pl')
-rwxr-xr-xchecksetup.pl19
1 files changed, 19 insertions, 0 deletions
diff --git a/checksetup.pl b/checksetup.pl
index 703358cec..807fa9016 100755
--- a/checksetup.pl
+++ b/checksetup.pl
@@ -1786,10 +1786,17 @@ $table{logincookies} =
index(lastused)';
+$table{classifications} =
+ 'id smallint not null auto_increment primary key,
+ name varchar(64) not null,
+ description mediumtext,
+
+ unique(name)';
$table{products} =
'id smallint not null auto_increment primary key,
name varchar(64) not null,
+ classification_id smallint not null default 1,
description mediumtext,
milestoneurl tinytext not null,
disallownew tinyint not null,
@@ -2153,6 +2160,7 @@ sub AddFDef ($$$) {
# be created with their associated schema change.
AddFDef("bug_id", "Bug \#", 1);
AddFDef("short_desc", "Summary", 1);
+AddFDef("classification", "Classification", 1);
AddFDef("product", "Product", 1);
AddFDef("version", "Version", 1);
AddFDef("rep_platform", "Platform", 1);
@@ -4021,6 +4029,7 @@ AddField("profiles", "extern_id", "varchar(64)");
AddGroup('tweakparams', 'Can tweak operating parameters');
AddGroup('editusers', 'Can edit or disable users');
AddGroup('creategroups', 'Can create and destroy groups.');
+AddGroup('editclassifications', 'Can create, destroy, and edit classifications.');
AddGroup('editcomponents', 'Can create, destroy, and edit components.');
AddGroup('editkeywords', 'Can create, destroy, and edit keywords.');
AddGroup('admin', 'Administrators');
@@ -4388,6 +4397,16 @@ if (GetFieldDef('bugs', 'short_desc')->[2]) { # if it allows nulls
$dbh->do("UPDATE groups SET last_changed = NOW() WHERE name = 'admin'");
+# 2003-10-24 - alt@sonic.net, bug 224208
+# Support classification level and make sure there is a default classification
+AddField('products', 'classification_id', 'smallint DEFAULT 1');
+$sth = $dbh->prepare("SELECT name FROM classifications WHERE id=1");
+$sth->execute;
+if (! $sth->rows) {
+ $dbh->do("INSERT INTO classifications (id,name,description) " .
+ "VALUES(1,'Unclassified','Unassigned to any classifications')");
+}
+
#
# Final checks...